A. Candy Bags time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Gerald has n younger brothers and their number happens to be even. One day he bought n2 candy bags. One bag has one candy, one…
A. Candy Bags http://codeforces.com/problemset/problem/334/A time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Gerald has n younger brothers and their number happens to be even. One day he…
读懂了题就会发现这是个超级大水题 Description Gerald has n younger brothers and their number happens to be even. One day he bought n2 candy bags. One bag has one candy, one bag has two candies, one bag has three candies and so on. In fact, for each integer k from 1 t…
A. Candy Bags time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Gerald has n younger brothers and their number happens to be even. One day he bought n2 candy bags. One bag has one candy, one…
B. Candy Boxes 题目链接:http://codeforces.com/problemset/problem/488/B time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There is an old tradition of keeping 4 boxes of candies in the house in Cy…
A. Candy Bagstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGerald has n younger brothers and their number happens to be even. One day he bought n2 candy bags. One bag has one candy, one bag has t…
A. Candy Bags 总糖果数\(\frac{n^2(n^2+1)}{2}\),所以每人的数量为\(\frac{n}{2}(n^2+1)\) \(n\)是偶数. B. Eight Point Sets 模拟. C. Secrets 将\(n\)转成3进制数,考虑最后一位非0位,没有刚好\(n\)的数量为非0位的前一位加1,当前位置0,最后将钱都转化为最低单位. D. Chips 在没有障碍的情况下,有冲突的列.行,我们可以找到一个排列解决冲突. 除了\(n\)是奇数时的中心点无法解决冲突.…
Kids like candies, so much that they start beating each other if the candies are not fairly distributed. So on your next party, you better start thinking before you buy the candies. If there are KK kids, we of course need K⋅XK⋅X candies for a fair di…