码迷,mamicode.com
首页 >  
搜索关键字:humble numbers    ( 7694个结果
HDU 2410 Barbara Bennett's Wild Numbers (想法题)
题目链接:HDU 2410 Barbara Bennett's Wild Numbers 题意:给出两串数w,s(长度相同),第一串中有“?”,问“?”取的值使w对应的数大于s对应的数 的最大方案数。 思路:W,S一一对应比较; 遇到第一个’?‘之前比较情况 1.w[i] 2.w[i]>s[i] break。之后有n个‘’?‘ 方案数就有10的n次方种。 3.w[i]=s[i] 继续比...
分类:Web程序   时间:2014-10-04 11:45:16    阅读次数:244
POJ 3340 & HDU 2410 Barbara Bennett's Wild Numbers(数学)
POJ 3340 & HDU 2410 Barbara Bennett's Wild Numbers(数学)...
分类:Web程序   时间:2014-10-03 20:53:15    阅读次数:189
HDU 1058 Humble Numbers(离线打表)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1058解题报告:输入一个n,输出第n个质因子只有2,3,5,7的数。用了离线打表,因为n最大只有5842。 1 #include 2 #define INT __int64 3 INT ans[5850]...
分类:其他好文   时间:2014-10-02 21:50:53    阅读次数:1042
Codeforces 385 C Bear and Prime Numbers
想法题...
分类:其他好文   时间:2014-10-02 18:52:53    阅读次数:198
数组中的跳跃问题
本文翻译自stackoverflow,by:王奎问题:我有一个数组:[1,2,3,6,7, 8, 9,20, 22]我想让它对用户下面形式显示Numbers 1 through 3, 6 through 9, 20, 22以下是一个完整是程序:/** blog:http://www.marksaas...
分类:其他好文   时间:2014-10-02 13:26:42    阅读次数:135
[LeetCode]AddTwoNumbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2014-10-02 02:34:02    阅读次数:227
leetcode - Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ [2], [3,4], [...
分类:其他好文   时间:2014-10-01 19:09:51    阅读次数:144
[思路题] spoj 11354 Amusing numbers
题意: 给k(1 比如 1就是5 ,3就是55 ,4就是56 思路: 首先我们可以发现,一位数有2个这的数,两位数有4个,三位数有8个。。 那么我们可以通过统计确定出第k大的数是几位的。 通过累和,一位数以下0个,两位数以下2,三位数以下6 n位数以下就是2^n-2 然后给k,从大到下搜索第一个小于k的bit[i],那么就有i位数。 然后就是对于i位数,它是第几个数。 比如说k...
分类:其他好文   时间:2014-10-01 18:42:11    阅读次数:137
JavaScript- The Good Parts Chapter 3 Objects
Upon a homely object Love can wink.—William Shakespeare, The Two Gentlemen of VeronaThe simple types of JavaScript are numbers, strings, booleans (tru...
分类:编程语言   时间:2014-10-01 15:31:31    阅读次数:351
leetcode--two sum
Problem:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of th...
分类:其他好文   时间:2014-09-30 23:33:10    阅读次数:319
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!