上一页 1 ··· 5 6 7 8 9 10 11 下一页

2012年8月10日

hdu 1709 The Balance

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1709View Code 1 /* 2 砝码称重 3 */ 4 5 6 #include<stdio.h> 7 #include<string.h> 8 int f(int x,int y) 9 {10 if(x>y) return x-y;11 else return y-x;12 }13 int main()14 {15 16 17 int n;18 int p[10010];19 int sum[10010];20 int temp[100... 阅读全文

posted @ 2012-08-10 11:00 仁者无敌8勇者无惧 阅读(102) 评论(0) 推荐(0) 编辑

2012年8月9日

hdu 1028Ignatius and the Princess III

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1028and the Princess IIITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7214Accepted Submission(s): 5118Problem Description"Well, it seems the first problem is too easy. I will let you know how foolish 阅读全文

posted @ 2012-08-09 13:43 仁者无敌8勇者无惧 阅读(212) 评论(0) 推荐(0) 编辑

hdu 1398Square Coins

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1398View Code 1 #include<stdio.h> 2 int main() 3 { 4 int n,i,j,k; 5 int sum[305]; 6 int temp[305]; 7 while(~scanf("%d",&n),n) 8 { 9 10 11 for(i=0;i<=n;i++)12 {13 sum[i]=1;14 temp[i]... 阅读全文

posted @ 2012-08-09 13:38 仁者无敌8勇者无惧 阅读(127) 评论(0) 推荐(0) 编辑

2012年8月8日

母函数详解

摘要: http://www.wutianqi.com/?p=596 阅读全文

posted @ 2012-08-08 21:43 仁者无敌8勇者无惧 阅读(101) 评论(0) 推荐(0) 编辑

Lucas定理

摘要: http://hi.baidu.com/%E9%A3%8E%E9%9B%B7%E8%BF%85%E7%83%88/blog/item/6266d9b34f18936d8ad4b253.html 阅读全文

posted @ 2012-08-08 17:43 仁者无敌8勇者无惧 阅读(110) 评论(0) 推荐(0) 编辑

hdu 4349Xiao Ming's Hope

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4349Xiao Ming's HopeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 279Accepted Submission(s): 198Problem DescriptionXiao Ming likes counting numbers very much, especially he is fond of counting odd num 阅读全文

posted @ 2012-08-08 11:28 仁者无敌8勇者无惧 阅读(606) 评论(0) 推荐(0) 编辑

二项式系数奇偶性的判定准则

摘要: 判定准则 (m≤ )的奇偶性取决于m和 —m的二进制表达式中是否存在位于同一数位上的两个数码都是1,如果存在,是偶数,否则 就是奇数组合数的奇偶 奇偶定义:对组合数C(n,k) (n>=k):将n,k分别化为二进制,若某二进制位对应的n为0,而k为1 ,则C(n,k)为偶数;否则为奇数。 下面是判定方法: 结论: 对于C(n,k),若n&k == k 则c(n,k)为奇数,否则为偶数。 证明: 对于C(n,k),若n&k == k 则c(n,k)为奇数,否则为偶数。 阅读全文

posted @ 2012-08-08 09:58 仁者无敌8勇者无惧 阅读(584) 评论(0) 推荐(0) 编辑

2012年8月7日

hdu 1873 看病要排队

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1873两种自定义优先级写法View Code 1 #include<iostream> 2 #include<queue> 3 #include<string> 4 using namespace std; 5 struct Node 6 { 7 int time; 8 int import; 9 bool operator<(const Node &a) const10 {11 if(a.import>import) return true;12 .. 阅读全文

posted @ 2012-08-07 13:55 仁者无敌8勇者无惧 阅读(241) 评论(0) 推荐(0) 编辑

自定义优先级

摘要: #include<iostream>#include<queue>#include<string>using namespace std;struct Node{ string name; int score; bool operator<(const Node &a) const { return a.score<score; }};int main(){ priority_queue<Node> ss; Node node; node.name="aaa"; node.score=90; ss.push 阅读全文

posted @ 2012-08-07 13:17 仁者无敌8勇者无惧 阅读(234) 评论(0) 推荐(0) 编辑

hdu 1263水果

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1263水果Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1528Accepted Submission(s): 608Problem Description夏天来了~~好开心啊,呵呵,好多好多水果~~Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了.In 阅读全文

posted @ 2012-08-07 12:08 仁者无敌8勇者无惧 阅读(1266) 评论(0) 推荐(0) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 下一页

导航