上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 57 下一页

2016年10月24日

2016-2017 ACM-ICPC, NEERC, Southern Subregional Contest A. Toda 2 贪心 + 暴力

摘要: A. Toda 2 time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output A. Toda 2 time limit per test 阅读全文

posted @ 2016-10-24 09:32 stupid_one 阅读(559) 评论(0) 推荐(0) 编辑

2016年10月23日

Canada Cup 2016 C. Hidden Word 构造模拟题

摘要: http://codeforces.com/contest/725/problem/C Each English letter occurs at least once in s. 注意到题目有这样一句话,那么就是说S中只有一个重复的字母。一定要看到这句话,不然做不了。 然后就找到pos1和pos2 阅读全文

posted @ 2016-10-23 09:10 stupid_one 阅读(268) 评论(0) 推荐(0) 编辑

2016年10月22日

Codeforces Round #377 (Div. 2) E. Sockets

摘要: http://codeforces.com/contest/732/problem/E 题目说得很清楚,每个电脑去插一个插座,然后要刚好的,电脑的power和sockets的值相同才行。 如果不同,还有一个操作,就是在sockets中插东西,使得sockets的值变成val / 2 + (val & 阅读全文

posted @ 2016-10-22 20:34 stupid_one 阅读(208) 评论(0) 推荐(0) 编辑

2016年10月20日

poj 2406 Power Strings 后缀数组解法

摘要: 连续重复子串问题 poj 2406 Power Strings http://poj.org/problem?id=2406 问一个串能否写成a^n次方这种形式。 虽然这题用kmp做比较合适,但是我们还是用后缀数组做一做,巩固后缀数组的能力。 对于一个串,如果能写出a^n这种形式,我们可以暴力枚举循 阅读全文

posted @ 2016-10-20 12:57 stupid_one 阅读(254) 评论(0) 推荐(0) 编辑

2016年10月18日

Codeforces Round #377 (Div. 2) D. Exams 贪心 + 简单模拟

摘要: http://codeforces.com/contest/732/problem/D 这题我发现很多人用二分答案,但是是不用的。 我们统计一个数值all表示要准备考试的所有日子和。+m(这些时间用来考试) 那么这个all值就是理想的最小值。然后去前all个数找,贪心地复习最小的科目,然后有的考试的 阅读全文

posted @ 2016-10-18 10:00 stupid_one 阅读(231) 评论(0) 推荐(0) 编辑

Codeforces Round #377 (Div. 2) 被坑了

摘要: http://codeforces.com/contest/732/problem/B 题目要求任意两个连续的日子都要 >= k 那么如果a[1] + a[2] < k,就要把a[2]加上数字使得总和 = k,因为这样能传递到a[3]而且是最优的, a[2]不需要加那么多,只需要加到两个的总和 = 阅读全文

posted @ 2016-10-18 09:51 stupid_one 阅读(125) 评论(0) 推荐(0) 编辑

2016年10月16日

CodeForces 731C C - Socks 并查集

摘要: Description Arseniy is already grown-up and independent. His mother decided to leave him alone for m days and left on a vacation. She have prepared a 阅读全文

posted @ 2016-10-16 23:42 stupid_one 阅读(850) 评论(2) 推荐(0) 编辑

Codeforces Round #376 (Div. 2) F. Video Cards 数学 & 暴力

摘要: http://codeforces.com/contest/731/problem/F 注意到一个事实,如果你要找一段区间中(从小到大的),有多少个数是能整除左端点L的,就是[L, R]这样。那么,很明显,把这个区间分段。分成[L, 2 * L - 1],因为这段区间中,都不大于等于L的两倍,这样就 阅读全文

posted @ 2016-10-16 23:36 stupid_one 阅读(225) 评论(0) 推荐(0) 编辑

HDU 1027 G - Can you answer these queries?

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4027 Can you answer these queries? Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/ 阅读全文

posted @ 2016-10-16 14:34 stupid_one 阅读(218) 评论(0) 推荐(0) 编辑

2016年10月15日

C - AtCoDeerくんと選挙速報 / AtCoDeer and Election Report

摘要: ceil有毒啊。。用ceil一直错。 思路就是模拟吧,设当前的答案是ansx和ansy。 如果比例是小于ansx的,那么就要乘以一个倍数k1,使得a * k1 >= ansx的。 所以就用ceil(ansx / a)嘛。。然后一直wa。 ansy的同理,最后选一个倍数大的去乘就行了。 搞不清楚为什么 阅读全文

posted @ 2016-10-15 22:20 stupid_one 阅读(228) 评论(0) 推荐(0) 编辑

上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 57 下一页

导航