摘要: B. Margarite and the best present 题目链接:https://codeforces.com/contest/1080/problem/B 题意: 给出一个数列:an=(-1)n,之后有询问,问 [l,r] 之间的ai和为多少。 题解:这个分情况讨论一下就可以了,区间长 阅读全文
posted @ 2018-11-25 21:02 heyuhhh 阅读(232) 评论(0) 推荐(0) 编辑
摘要: A. Petya and Origami 题目链接:https://codeforc.es/contest/1080/problem/A 题意: 给出n,k,k表示每个礼品里面sheet的数量(礼品种类可以不同),现在给n位朋友送礼,每位朋友需要2个xx,5个xx,8个xx,问最少需要买多少礼品。 阅读全文
posted @ 2018-11-25 20:56 heyuhhh 阅读(144) 评论(0) 推荐(0) 编辑
摘要: C. Masha and two friends 题目链接:https://codeforc.es/contest/1080/problem/C 题意: 给出一个黑白相间的n*m的矩阵,现在先对一个子矩阵颜色变为白色,然后再对一个子矩阵颜色变为黑色,问最终白色格子和黑色格子有多少? 题解: 定义w( 阅读全文
posted @ 2018-11-25 20:51 heyuhhh 阅读(164) 评论(0) 推荐(0) 编辑
摘要: D. Olya and magical square 题目链接:https://codeforces.com/contest/1080/problem/D 题意: 给出一个边长为2n的正方形,每次可以将其划分,要求划分出来从左下角到右上角沿着左边和上边的边走的路径的小正方形边长相等。现在有k个划分的 阅读全文
posted @ 2018-11-25 20:06 heyuhhh 阅读(370) 评论(2) 推荐(0) 编辑
摘要: A Bug's Life 题目链接:http://poj.org/problem?id=2492 Description: Background : Professor Hopper is researching the sexual behavior of a rare species of bu 阅读全文
posted @ 2018-11-22 23:50 heyuhhh 阅读(320) 评论(0) 推荐(0) 编辑
摘要: Navigation Nightmare 题目链接:http://poj.org/problem?id=1984 Description: Farmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usually numb 阅读全文
posted @ 2018-11-22 23:42 heyuhhh 阅读(261) 评论(0) 推荐(0) 编辑
摘要: Parity Game 题目链接:http://poj.org/problem?id=1733 Description: Now and then you play the following game with your friend. Your friend writes down a sequ 阅读全文
posted @ 2018-11-22 23:26 heyuhhh 阅读(338) 评论(0) 推荐(0) 编辑
摘要: Supermarket 题目链接:http://poj.org/problem?id=1456 Description: A supermarket has a set Prod of products on sale. It earns a profit px for each product x 阅读全文
posted @ 2018-11-22 00:05 heyuhhh 阅读(181) 评论(0) 推荐(0) 编辑
摘要: True Liars Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16338 Accepted Submission(s): 5724 题目链 阅读全文
posted @ 2018-11-21 23:39 heyuhhh 阅读(246) 评论(0) 推荐(0) 编辑
摘要: How Many Answers Are Wrong Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16338 Accepted Submiss 阅读全文
posted @ 2018-11-21 23:18 heyuhhh 阅读(165) 评论(0) 推荐(0) 编辑