B. Bear and Blocks Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/573/problem/B Description Limak is a little bear who loves to play. Today he is playing by destroying block towers. He built n towers in a row. The i-th tow…
A. Bear and Poker Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/573/problem/A Description Limak is an old brown bear. He often plays poker with his friends. Today they went to a casino. There are n players (including Lima…
题目链接:http://codeforces.com/contest/573/problem/C题目大意:在两行无限长的点列上面画n个点以及n-1条边使得构成一棵树,并且要求边都在同一平面上且除了节点处任意两条边之间没有公共交点.给定n和n-1条边的关系,问这棵树能否满足要求地画在这个两行平行点列上? 解题思路:我们假设这么k一棵树已经被画好在了这个两行平行点列上,我们在其中选择最左边地点和最右边的点,并且设连接最左边的点和最右边的点为主链,可以发现,在树所在地区域内,主链会将剩下的区域划分为零…
http://codeforces.com/contest/574/problem/D Bear and Blocks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Limak is a little bear who loves to play. Today he is playing by destroying block…
                                                A. Bear and Elections                                                                                                                                                                            time limi…
                                      B. Bear and Three Musketeers                                                                             time limit per test  2 seconds                                                                            …
                                              C. Bear and Poker                                                                  time limit per test  2 seconds                                                                  memory limit per test  25…
以后每做完一场CF,解题报告都写在一起吧   暴力||二分 A - Bear and Elections 题意:有n个候选人,第一个候选人可以贿赂其他人拿到他们的票,问最少要贿赂多少张票第一个人才能赢 分析:正解竟然是暴力!没敢写暴力,卡了很久,导致这场比赛差点爆零!二分的话可以优化,但对于这题来说好像不需要... 收获:以后CF div2的A题果断暴力   代码(暴力): /************************************************ * Author :R…
Codeforces Round #539 (Div. 1) A. Sasha and a Bit of Relax description 给一个序列\(a_i\),求有多少长度为偶数的区间\([l,r]\)满足\([l,mid]\)的异或和等于\([mid+1,r]\)的异或和. solution 等价于询问有多少长度为偶数的区间异或和为\(0\). 只需要两个位置的异或前缀和与下标奇偶性相同即可组成一个合法区间. #include<cstdio> #include<algorith…
VK Cup 2015 - Round 1 (unofficial online mirror, Div. 1 only)E. The Art of Dealing with ATM Time Limit: 2 Sec  Memory Limit: 256 MBSubmit: xxx  Solved: 2xx 题目连接 http://codeforces.com/contest/529/problem/E Description ATMs of a well-known bank of a sm…