上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: 1 /* 2 CF789A. Anastasia and pebbles 3 http://codeforces.com/contest/789/problem/A 4 水题 5 题意:有两个背包,每次分别可取k个物品,要求每次背包中的物品都是一种 6 问要取多少次。 7 对于每种物品,都要取ceil(n/k)次,因此只要加起来再除以2就是答案 8 */ 9 #i... 阅读全文
posted @ 2017-03-30 12:01 BBBob 阅读(839) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 CF789C. Functions again 3 http://codeforces.com/contest/789/problem/C 4 水题 5 题意:求数组中的连续和的最大值 6 */ 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 //... 阅读全文
posted @ 2017-03-30 11:55 BBBob 阅读(514) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 HDU2161 Primes 3 http://acm.hdu.edu.cn/showproblem.php?pid=2161 4 数论 水题 5 注意输入截止条件是n 8 #include 9 #include 10 #include 11 #include 12 #include 13 //#define test 14 using namesp... 阅读全文
posted @ 2017-03-29 20:46 BBBob 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 UVA11752 The Super Powers 3 https://vjudge.net/contest/153365#problem/Y 4 数论 5 注意a^n=b要用除法求,并且求得的n比实际大1 6 */ 7 #include 8 #include 9 #include 10 #include 11 #include 12 #in... 阅读全文
posted @ 2017-03-29 20:28 BBBob 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 UVA11827 Maximum GCD 3 https://vjudge.net/contest/153365#problem/V 4 数论 gcd 5 水题,然而读入比较坑 6 * 7 */ 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14... 阅读全文
posted @ 2017-03-29 18:58 BBBob 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 Tsinsen A1206. 小Z的袜子 3 http://www.tsinsen.com/new/A1206 4 BZOJ 2038: [2009国家集训队]小Z的袜子(hose) 5 http://www.lydsy.com/JudgeOnline/problem.php?id=2038 6 莫队算法 7 */ 8 #include ... 阅读全文
posted @ 2017-03-28 22:17 BBBob 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 CF617E. XOR and Favorite Number 3 http://codeforces.com/contest/617/problem/E 4 莫队算法 5 题意:求l,r区间内异或和为k的对数 6 用times记录某异或值在当前区间中的个数 7 */ 8 #include 9 #include 10 #include 11 #i... 阅读全文
posted @ 2017-03-28 20:39 BBBob 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 BJFU fudq的等式 3 http://101.200.220.237/contest/19/problem/118/ 4 数论 勒让德定理 二分答案 5 */ 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 //#defi... 阅读全文
posted @ 2017-03-28 19:04 BBBob 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 BJFU 质数相关 3 http://101.200.220.237/contest/19/problem/116/ 4 二分图 5 按质因数奇偶性建立二分图 6 * 7 * 8 */ 9 #include 10 #include 11 #include 12 #include 13 #include 14 #... 阅读全文
posted @ 2017-03-28 19:02 BBBob 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 CF55C. Pie or die 3 http://codeforces.com/problemset/problem/55/C 4 博弈论 乱搞 5 获胜条件是存在一个棋子到边界的值小于5 6 */ 7 #include 8 int main() 9 { 10 int n,m,k; 11 scanf("%d%d%d",&n,&m,&... 阅读全文
posted @ 2017-03-27 16:39 BBBob 阅读(173) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页