摘要:Description 求∑∑((n mod i)*(m mod j))其中1#include #include #include #include #include #include #include #include #include #define LL long long#define MO...
阅读全文
摘要:DescriptionGood news for us: to release the financial pressure, the government started selling galaxies and we can buy them from now on! The first one...
阅读全文
摘要:DescriptionThere are n people standing in a line. Each of them has a unique id number.Now the Ragnarok is coming. We should choose 3 people to defend ...
阅读全文
摘要:DescriptionF(n) = (n % 1) + (n % 2) + (n % 3) + ...... (n % n)。其中%表示Mod,也就是余数。例如F(6) = 6 % 1 + 6 % 2 + 6 % 3 + 6 % 4 + 6 % 5 + 6 % 6 = 0 + 0 + 0 + 2 +...
阅读全文
摘要:DescriptionEdwardhasasetofnintegers{a1,a2,...,an}.Herandomlypicksanonemptysubset{x1,x2,…,xm}(eachnonemptysubsethasequalprobabilitytobepicked),andwould...
阅读全文
摘要:DescriptionAliceisplayingagamewithBob.AliceshowsNintegersa1,a2,…,aN,andM,K.Shesayseachintegers1≤ai≤M.AndnowAlicewantstoaskforeachd=1toM,howmanydiffere...
阅读全文
摘要:DescriptionAs we know, any positive integer C ( C >= 2 ) can be written as the multiply of some prime numbers:C = p1×p2× p3× ... × pkwhich p1, p2 ... ...
阅读全文
摘要:DescriptionA lattice point (x, y) in the first quadrant (x and y are integers greater than or equal to 0), other than the origin, is visible from the ...
阅读全文
摘要:DescriptionGiven 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x...
阅读全文
摘要:Problem DescriptionIn Geometry, the problem of track is very interesting. Because in some cases, the track of point may be beautiful curve. For exampl...
阅读全文
摘要:Problem DescriptionGiven a prime numberC(1≤C≤2×105), and three integers k1, b1, k2(1≤k1,k2,b1≤109). Please find all pairs (a, b) which satisfied the e...
阅读全文
摘要:Problem DescriptionOne day, a useless calculator was being built by Kuros. Let's assume that number X is showed on the screen of calculator. At first,...
阅读全文
摘要:Young naturalist Bill studies ants in school. His ants feed on plant-louses that live on apple trees. Each ant colony needs its own apple tree to feed...
阅读全文
摘要:The United Nations has decided to build a new headquarters in Saint Petersburg, Russia. It will have a form of a rectangular parallelepiped and will c...
阅读全文