Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
---|---|---|---|---|---|---|
838 | IndiaHacks 2nd Elimination 2017 (unofficial, unrated mirror, ICPC rules) | FINISHED | False | 10800 | 235439724 | Aug. 7, 2017, 6:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 356 ) | C | Future Failure | PROGRAMMING | dp games | 2800 |
B'Alice and Bob are playing a game with a string of characters, with Alice going first. The string consists n characters, each of which is one of the first k letters of the alphabet. On a player xe2 x80 x99s turn, they can either arbitrarily permute the characters in the words, or delete exactly one character in the word (if there is at least one character). In addition, their resulting word cannot have appeared before throughout the entire game. The player unable to make a valid move loses the game. Given n, xe2 x80 x89k, xe2 x80 x89p, find the number of words with exactly n characters consisting of the first k letters of the alphabet such that Alice will win if both Alice and Bob play optimally. Return this number modulo the prime number p. The first line of input will contain three integers n, xe2 x80 x89k, xe2 x80 x89p (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89250 xe2 x80 x89000, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8926, 108 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89p xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109 xe2 x80 x89+ xe2 x80 x89100, p will be prime). Print a single integer, the number of winning words for Alice, modulo p. There are 14 strings that that Alice can win with. For example, some strings are "bbaa" and "baaa". Alice will lose on strings like "aaaa" or "bbbb". '... |
53736 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
30306710 | laofudasuan | C | Sept. 13, 2017, 12:25 p.m. | OK | GNU C++ | TESTS | 21 | 841 | 42086400 | 2800 | |
30306413 | laofudasuan | C | Sept. 13, 2017, 12:14 p.m. | OK | GNU C++ | TESTS | 21 | 858 | 21094400 | 2800 | |
37532387 | Worldwide_D | C | April 22, 2018, 11:53 a.m. | OK | GNU C++ | TESTS | 21 | 997 | 87552000 | 2800 | |
29862990 | vjudge2 | C | Aug. 29, 2017, 10:10 a.m. | OK | GNU C++ | TESTS | 21 | 1341 | 64102400 | 2800 | |
32114120 | zhhx | C | Nov. 7, 2017, 9:51 a.m. | OK | GNU C++ | TESTS | 21 | 1591 | 22835200 | 2800 | |
29775566 | F.Darcy | C | Aug. 25, 2017, 9:47 a.m. | OK | GNU C++ | TESTS | 21 | 1669 | 28672000 | 2800 | |
30257339 | yml | C | Sept. 11, 2017, 1:06 a.m. | OK | GNU C++ | TESTS | 21 | 2605 | 22118400 | 2800 | |
30257308 | yml | C | Sept. 11, 2017, 1:01 a.m. | OK | GNU C++ | TESTS | 21 | 2995 | 22118400 | 2800 | |
29264096 | rqgao2014 | C | Aug. 7, 2017, 12:02 p.m. | OK | GNU C++11 | TESTS | 21 | 327 | 6963200 | 2800 | |
29317855 | ccdream | C | Aug. 10, 2017, 5:08 a.m. | OK | GNU C++11 | TESTS | 21 | 405 | 68198400 | 2800 | |
34210093 | wfj_2048 | C | Jan. 16, 2018, 12:53 a.m. | OK | GNU C++11 | TESTS | 21 | 639 | 50380800 | 2800 | |
33849516 | HuangYiming | C | Jan. 1, 2018, 2:59 p.m. | OK | GNU C++11 | TESTS | 21 | 733 | 26214400 | 2800 | |
33849324 | HuangYiming | C | Jan. 1, 2018, 2:46 p.m. | OK | GNU C++11 | TESTS | 21 | 826 | 25088000 | 2800 | |
29362633 | quailty | C | Aug. 11, 2017, 7:37 p.m. | OK | GNU C++11 | TESTS | 21 | 1153 | 4915200 | 2800 | |
29317713 | ccdream | C | Aug. 10, 2017, 4:58 a.m. | OK | GNU C++11 | TESTS | 21 | 1170 | 67276800 | 2800 | |
30854300 | snowflake | C | Sept. 30, 2017, 4:06 a.m. | OK | GNU C++11 | TESTS | 21 | 1248 | 84992000 | 2800 | |
29263113 | chemthan | C | Aug. 7, 2017, 11:13 a.m. | OK | GNU C++11 | TESTS | 21 | 1404 | 102912000 | 2800 | |
29263054 | chemthan | C | Aug. 7, 2017, 11:10 a.m. | OK | GNU C++11 | TESTS | 21 | 1404 | 103014400 | 2800 | |
40980312 | ReaLNero1 | C | July 30, 2018, 5:28 p.m. | OK | GNU C++14 | TESTS | 21 | 295 | 78643200 | 2800 | |
29678627 | whzzt | C | Aug. 22, 2017, 9:11 a.m. | OK | GNU C++14 | TESTS | 21 | 296 | 78643200 | 2800 | |
55332581 | alan_cty | C | June 9, 2019, 11:52 a.m. | OK | GNU C++14 | TESTS | 21 | 312 | 45158400 | 2800 | |
29323882 | Los_Angelos_Laycurse | C | Aug. 10, 2017, 10:38 a.m. | OK | GNU C++14 | TESTS | 21 | 342 | 33484800 | 2800 | |
29266738 | tun | C | Aug. 7, 2017, 2:15 p.m. | OK | GNU C++14 | TESTS | 21 | 421 | 32256000 | 2800 | |
29476684 | dotorya | C | Aug. 15, 2017, 8:25 a.m. | OK | GNU C++14 | TESTS | 21 | 514 | 47001600 | 2800 | |
54875812 | alan_cty | C | May 31, 2019, 11:45 a.m. | OK | GNU C++14 | TESTS | 21 | 577 | 87142400 | 2800 | |
57505430 | zsyzsy | C | July 22, 2019, 11:51 a.m. | OK | GNU C++14 | TESTS | 21 | 670 | 33280000 | 2800 | |
29349168 | Marco_L_T | C | Aug. 11, 2017, 9:22 a.m. | OK | GNU C++14 | TESTS | 21 | 919 | 41984000 | 2800 | |
29349270 | Marco_L_T | C | Aug. 11, 2017, 9:26 a.m. | OK | GNU C++14 | TESTS | 21 | 920 | 41984000 | 2800 | |
61901842 | vjudge3 | C | Oct. 5, 2019, 8:46 a.m. | OK | GNU C++17 | TESTS | 21 | 124 | 16076800 | 2800 | |
56546182 | vjudge1 | C | July 5, 2019, 7:45 a.m. | OK | GNU C++17 | TESTS | 21 | 124 | 90624000 | 2800 | |
57302123 | Benq | C | July 19, 2019, 12:54 a.m. | OK | GNU C++17 | TESTS | 21 | 218 | 3993600 | 2800 | |
43552204 | TrivialMan | C | Sept. 29, 2018, 2:09 a.m. | OK | GNU C++17 | TESTS | 21 | 748 | 34099200 | 2800 | |
48651611 | Shayan.P | C | Jan. 20, 2019, 9:39 p.m. | OK | GNU C++17 | TESTS | 21 | 842 | 24473600 | 2800 | |
51983228 | alex_Harry | C | March 29, 2019, 5:18 p.m. | OK | GNU C++17 | TESTS | 21 | 1762 | 23040000 | 2800 | |
51983284 | alex_Harry | C | March 29, 2019, 5:19 p.m. | OK | GNU C++17 | TESTS | 21 | 1825 | 23040000 | 2800 | |
69571782 | hjk1030 | C | Jan. 26, 2020, 2:18 p.m. | OK | GNU C++17 | TESTS | 21 | 2074 | 20992000 | 2800 | |
56718874 | mocania | C | July 8, 2019, 3:47 p.m. | OK | GNU C++17 | TESTS | 21 | 2823 | 65126400 | 2800 |
Back to search problems