联系: http://soj.me/1732 Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description: Alice is a beautiful and clever girl. Bob would like to play with Alice. One day, Alice got a very big rectangle and wanted to divide it into small square pieces.…
题意:有一堆数,然后有两个人轮流从中取出两个数,这两个数的差的绝对值不在这个集合,然后把这个数放进这个集合,如果哪个人不能拿了,就是输了,问你谁赢. 析:当时连题意都没看好,以为拿出两个数,就不放回了,如果好好分析第三组样例,就不会看成这样了. 思路应该是这样的,既然是拿了再放差的绝对值放进去,那么最后肯定会形成一个等差数列的,想想对不对,可以写几个试试,那么然后除以最大公约数,就能形成一个1-最大数的 等差队列,最大数就是输入的最大数,因为两个正数作差,肯定比最大的小.那么答案就有了. 代码如…
Alice and Bob Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Alice and Bob like playing games very much.Today, they introduce a new game. There is a polynomial like this: (a0*x^(2^0)+1) * (a1 * x^(2^1)+1)*.......*(an-1 * x^(2^(n-1))+1). T…
Alice and Bob Time Limit: 1000ms   Memory limit: 65536K 题目描述 Alice and Bob like playing games very much.Today, they introduce a new game. There is a polynomial like this: (a0*x^(2^0)+1) * (a1 * x^(2^1)+1)*.......*(an-1 * x^(2^(n-1))+1). Then Alice as…
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2608 Alice and Bob Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Alice and Bob like playing games very much.Today, they introduce a new game. There is a polynomial li…
题目传送门 /* 题意: 求(a0*x^(2^0)+1) * (a1 * x^(2^1)+1)*.......*(an-1 * x^(2^(n-1))+1) 式子中,x的p次方的系数 二进制位运算:p = 2 ^ i + 2 ^ j + 2 ^ k + ...,在二进制表示下就是1的出现 例如:10 的二进制 为1010,10 = 2^3 + 2^1 = 8 + 2,而且每一个二进制数都有相关的a[i],对p移位运算,累计取模就行了 */ #include <cstdio> #include…
  Alice and Bob Time Limit: 1000ms   Memory limit: 65536K 题目描述 Alice and Bob like playing games very much.Today, they introduce a new game. There is a polynomial like this: (a0*x^(2^0)+1) * (a1 * x^(2^1)+1)*.......*(an-1 * x^(2^(n-1))+1). Then Alice…
又见Alice and Bob 时间限制:1000 ms  |  内存限制:65535 KB 难度:3   描述 集训生活如此乏味,于是Alice和Bob发明了一个新游戏.规则如下:首先,他们得到一个集合包含n个特定的整数,接着他们轮流做以下操作,每一次操作,Alice或者Bob(轮到谁就是谁)会从集合中选择两个整数x 和 y ,(但是集合中不能包含| x - y|),接着他就会把整数|x - y| 加入集合,因此,集合中的数据多加了一个…… 如果当前玩家不能执行操作了,他就输了.问题是如果Al…
题目描述 Alice and Bob like playing games very much.Today, they introduce a new game. There is a polynomial like this: (a0*x^(2^0)+1) * (a1 * x^(2^1)+1)*.......*(an-1 * x^(2^(n-1))+1). Then Alice ask Bob Q questions. In the expansion of the Polynomial, G…
Alice and Bob Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 147    Accepted Submission(s): 22 Problem Description As you know, Alice and Bob always play game together, and today they get a…