上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: 11021 TribblesGRAVITATION, n.“The tendency of all bodies to approach one another with a strengthproportion to the quantity of matter they contain – th 阅读全文
posted @ 2016-08-28 18:48 Yan_Bin 阅读(390) 评论(0) 推荐(0)
摘要: 10561 TreblecrossTreblecross is a two player game where the goal is to get three ‘X’ in a row on a one-dimensional board.At the start of the game all 阅读全文
posted @ 2016-08-28 18:09 Yan_Bin 阅读(202) 评论(0) 推荐(0)
摘要: 11859 Division Game Division game is a 2-player game.In this game, there is a matrix of positive integers with N rows and M columns.Players make their 阅读全文
posted @ 2016-08-27 18:01 Yan_Bin 阅读(142) 评论(0) 推荐(0)
摘要: 考虑一个简单的游戏: 有两个盒子,其中一个装有m颗糖、另一个装有n颗糖,将这样的状态记为(m,n)。每次的移动是将其中一个盒子清空,把另一个盒子的一些糖拿到被清空的盒子里使得两个盒子至少各有一颗糖。两个操作者轮流进行操作,不能操作者败。需要判断一个状态是否先手必败。 按照k=m+n从小到大的顺序进行 阅读全文
posted @ 2016-08-27 12:17 Yan_Bin 阅读(361) 评论(0) 推荐(0)
摘要: 11916 Emoogle GridYou have to color an M  N (1  M;N  108) two dimensional grid. You will be provided K(2  K  108) different colors to do so. You 阅读全文
posted @ 2016-08-26 22:25 Yan_Bin 阅读(685) 评论(0) 推荐(0)
摘要: 10253 Series-Parallel NetworksIn this problem you are expected to count two-terminal series-parallel networks. These are electricnetworks considered t 阅读全文
posted @ 2016-08-26 11:48 Yan_Bin 阅读(640) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 typedef long long LL; 6 int mul_mod(int a,int b,int n){ // a、b都小于n 7 return a * b % n; 8 } 9 int pow_mod(int a,int p,int n){ 10 if(p... 阅读全文
posted @ 2016-08-26 00:27 Yan_Bin 阅读(993) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 typedef long long LL; 6 // 求x和y使得ax+by=d并且|x|+|y|最小。其中d=gcd(a,b) 7 void exgcd(LL a,LL b,LL& d,LL& x,LL& y){ 8 if(!b) d = a,x =... 阅读全文
posted @ 2016-08-25 17:39 Yan_Bin 阅读(150) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 typedef long long LL; 6 // 求x和y使得ax+by=d并且|x|+|y|最小。其中d=gcd(a,b) 7 void exgcd(LL a,LL b,LL& d,LL& x,LL& y){ 8 if(!b) d = a,x =... 阅读全文
posted @ 2016-08-25 17:18 Yan_Bin 阅读(662) 评论(0) 推荐(0)
摘要: GCD Extreme (II) Given the value of N, you will have to find the value of G. The definition of G is given below: uva 11426 - GCD - Extreme (II)" v:sha 阅读全文
posted @ 2016-08-25 15:21 Yan_Bin 阅读(279) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页