turuthok.wordpress.com
turuthok's blogFacebook Hacker Cup – 1A – Wine Tasting. Posted by turuthok in Programming. The first line of the input is the number of test cases, N. Lines each contain a test case, which consists of two integers, G. Separated by a single space. G. Is the total number of glasses of wine and C. Is the minimum number that the person must correctly identify to win. For each test case, output a line containing a single integer, the number of ways that the person can win the game modulo 1051962371. F(n, pc, t). Contains th...
http://turuthok.wordpress.com/