题意:一个数的质因子如果只是2,3,5,7中的若干个。则这个数叫做humble number。例如:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ...给n,问第n个humble number是多少。思路...
分类:
其他好文 时间:
2015-01-25 00:02:21
阅读次数:
171
题目:
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input...
分类:
其他好文 时间:
2015-01-24 22:48:17
阅读次数:
161
这题题目没怎么弄清,不知道循环旋转的时候从哪开始,也就不想了,写个简答的约瑟夫循环
#include
using namespace std ;
struct LinkNode {
LinkNode *link ;
int data ;
} ;//dingyi
void CreatList (LinkNode *first,int number) {
// LinkNode *...
分类:
其他好文 时间:
2015-01-24 22:47:49
阅读次数:
142
https://oj.leetcode.com/problems/maximum-product-subarray/Find the contiguous subarray within an array (containing at least one number) which has the ...
分类:
其他好文 时间:
2015-01-24 22:38:58
阅读次数:
254
题目链接:点击打开链接
Description
Give a positive number, count the sum of the distinct subsequence of it, moreover, any subsequence should not contain leading zeroes except it is zero.
...
分类:
其他好文 时间:
2015-01-24 20:08:06
阅读次数:
240
题意:定义一个数为“balanced number” 当其满足存在一个数位pos(平衡点),在pos左边的数位的值乘与pos位的距离值的总和等于右
边的数位的值乘与pos位的距离值的总和,给定一个区间[l , r],求区间内有多少个balanced number。
思路:设dp[ pos ][ i ][ j ]表示平衡点在i位的情况下,当前考虑pos位,之前已形成的力矩为j(数乘以距离平衡点的...
分类:
其他好文 时间:
2015-01-24 18:49:44
阅读次数:
131
过滤器,也就是展示数据之前对其过滤一番。AngularJS提供了一些常用的过滤器,而且支持自定义过滤器。在{{}}内通过|来调用filter,例如:{{ 2015 | number:2 }}其中number就是filter的名称,:后接参数。内置filter下面列出常用的内置过滤器。number以数...
分类:
Web程序 时间:
2015-01-24 18:41:32
阅读次数:
488
题目大意:给出一些数字,要求选出一些数字并保证所有数字和最大,要求这其中的数字任意两个至少满足一个条件,则不能同时被选:1.这两个数的平方和是完全平方数。2.gcd(a,b) = 1。
思路:我们可以将奇数和偶数分开来讨论,奇数不满足1,偶数不满足2,所以奇数和奇数,偶数和偶数不会互相影响。之后O(n^2)的讨论其他数字对,有影响就连边,流量正无穷,最后跑最小割最最大获利。
C...
分类:
其他好文 时间:
2015-01-24 17:26:22
阅读次数:
186
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址。type: 要求为String类型的参数,请求方式(post或get)默认为get。注意其他http请求方法,例如put和 delete也可以使用,但仅部分浏览器支持。timeout: 要求为Number类型的参数,设置请求...
分类:
Web程序 时间:
2015-01-24 17:16:43
阅读次数:
155
Minimum Inversion Number
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 11981 Accepted Submission(s): 7321
Problem Description...
分类:
编程语言 时间:
2015-01-24 15:53:20
阅读次数:
152