摘要: http://ac.jobdu.com/problem.php?id=1346View Code 1 #include<iostream> 2 #include<cstring> 3 #include<algorithm> 4 #include<cmath> 5 using namespace std; 6 typedef struct node 7 { 8 int id,score; 9 };10 node a[1008];11 int n,m;12 bool cmp(const node &a,const node &b)13 阅读全文
posted @ 2012-03-28 16:00 keepmoving89 阅读(172) 评论(0) 推荐(0) 编辑
摘要: http://ac.jobdu.com/problem.php?id=1380View Code 1 /*每个正数都是一个32位二进制串,只有一个lucky number 2 lucky出现m%n次,其他为n次,如果没有lucky,序列中个位为0的整数和 3 都是n的整数倍,lucky出现m%n次,统计序列中1的整数的个数,假设为C 4 若C%n==0 luck的个位为0,否则C%n一定为m%n,且luck个位为1 5 其它位跟给位一样*/ 6 #include<iostream> 7 #include<cstring> 8 #include<cstdio> 阅读全文
posted @ 2012-03-28 12:42 keepmoving89 阅读(472) 评论(0) 推荐(0) 编辑