摘要: 1 /* 2 1 3 126 223092870 4 210 330 390 462 510 546 570 690 714 770 798 858 910 966 1122 1155 1190 1254 1326 1330 1365 1430 1482 1518 1610 1785 1794 18 阅读全文
posted @ 2016-04-07 23:34 cdongyang 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <algorithm> 3 #define MAX 100000 4 #define LL long long 5 #define unsigned U 6 //using namespace std; 7 int cas=1,T; 8 阅读全文
posted @ 2016-04-06 20:59 cdongyang 阅读(393) 评论(0) 推荐(0) 编辑
摘要: 1 #include <cstdio> 2 #include <queue> 3 #include <cstring> 4 #include <iostream> 5 #include <cstdlib> 6 #include <algorithm> 7 #include <vector> 8 #i 阅读全文
posted @ 2016-03-27 22:24 cdongyang 阅读(227) 评论(0) 推荐(0) 编辑
摘要: input T <=10 n k n<=1000 k<=10^18 a1,a2,...an |ai|<=10^18 output (a1^k+a2^k+...+an^k)%10^10+7 Sample Input 2 Sample Output 6 60074 做法:快速幂+__int128,需注意 阅读全文
posted @ 2016-03-25 23:39 cdongyang 阅读(186) 评论(0) 推荐(0) 编辑
摘要: input 样例个数T <=10000 每个样例一个n(2<=n<=10^8) output lcm(1,2,...,n)%2^32 Sample Input 5 10 5 200 15 20 Sample Output 2520 60 2300527488 360360 232792560做法:质 阅读全文
posted @ 2016-03-25 22:02 cdongyang 阅读(358) 评论(0) 推荐(0) 编辑
摘要: input n 不超过50个例子,n==0结束输入 Sample Input 7 15 16 101 0 7 15 16 101 0 7 15 16 101 0 output 最少个不同数字的n的倍数的x,若不同数字个数一样,输出最小的x Sample Output 7 555 16 1111 根据 阅读全文
posted @ 2015-12-22 15:26 cdongyang 阅读(219) 评论(0) 推荐(0) 编辑
摘要: inputT 132,输出Impossible,否则输出x做法:dp,d(x,y)=d(x,y-1)+d(x-1,y-1),x:egg,y:floor求出下限,即x个鸡蛋至少要试多少次 1 # include 2 # include 3 #define INF 2000000010 4 int... 阅读全文
posted @ 2015-12-21 20:06 cdongyang 阅读(325) 评论(0) 推荐(0) 编辑
摘要: n m 1<=n,m<=1000 n*m的地图,全为大写字母 1 #include <bits/stdc++.h> 2 #define MAX 1000000 3 #define LL long long 4 using namespace std; 5 int cas=1,T,n,m,v[1010 阅读全文
posted @ 2015-12-21 19:53 cdongyang 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 搬砖 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 5134 Accepted Submission(s): 1288 Problem Desc 阅读全文
posted @ 2015-12-18 14:45 cdongyang 阅读(443) 评论(0) 推荐(0) 编辑
摘要: inputT 1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #define... 阅读全文
posted @ 2015-12-18 14:25 cdongyang 阅读(774) 评论(0) 推荐(0) 编辑