摘要:
Find the MarbleTime Limit: 2 Seconds Memory Limit: 65536 KBAlice and Bob are playing a game. This game is played with several identical pots and one marble. When the game starts, Alice puts the p... 阅读全文
摘要:
求A,B的最大公约数,并求出X,Y A*X+B*Y=gcd(A,B)int ex_gcd(int a,int b,int &x,int &y){ if(b==0) { x=1;y=0; return a; } else { int r=gcd(b,a&b,y,x); y-=x*(a/b)... 阅读全文
摘要:
Modular InverseTime Limit: 2 Seconds Memory Limit: 65536 KBThe modular modular multiplicative inverse of an integer a modulo m is an integer x such that a-1≡x (mod m). This is equivalent to ax≡1 ... 阅读全文
摘要:
Draw Something CheatTime Limit: 2 Seconds Memory Limit: 65536 KBHave you played Draw Something? It's currently one of the hottest social drawing games on Apple iOS and Android Devices! In this ga... 阅读全文