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 |
---|---|---|---|---|---|---|
603 | Codeforces Round 334 (Div. 1) | FINISHED | False | 7200 | 288627904 | Dec. 1, 2015, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1917 ) | C | Lieges of Legendre | PROGRAMMING | games math | 2300 |
B'Kevin and Nicky Sun have invented a new game called Lieges of Legendre. In this game, two players take turns modifying the game state with Kevin moving first. Initially, the game is set up so that there are n piles of cows, with the i-th pile containing ai cows. During each player 's turn, that player calls upon the power of Sunlight, and uses it to either: The player who removes the last cow wins. Given n, k, and a sequence a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an, help Kevin and Nicky find the winner, given that both sides play in optimal way. The first line of the input contains two space-separated integers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). The second line contains n integers, a1, xe2 x80 x89a2, xe2 x80 x89... an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) describing the initial state of the game. Output the name of the winning player, either "Kevin" or "Nicky" (without quotes). In the second sample, Nicky can win in the following way: Kevin moves first and is forced to remove a cow, so the pile contains two cows after his move. Next, Nicky replaces this pile of size 2 with two piles of size 1. So the game state is now two piles of size 1. Kevin then removes one of the remaining cows and Nicky wins by removing the other.'... |
Codeforces Round #334 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
14600740 | Gassa | C | Dec. 1, 2015, 5:13 p.m. | OK | D | TESTS | 60 | 46 | 4198400 | 2300 | |
14608353 | Gassa | C | Dec. 1, 2015, 9:16 p.m. | OK | D | TESTS | 60 | 61 | 4198400 | 2300 | |
14600973 | TheHedgehog | C | Dec. 1, 2015, 5:15 p.m. | OK | Delphi | TESTS | 60 | 31 | 23142400 | 2300 | |
15777291 | Nikita666 | C | Feb. 3, 2016, 8:35 p.m. | OK | FPC | TESTS | 60 | 31 | 0 | 2300 | |
14688416 | ThereIsNoSalvationForMe | C | Dec. 7, 2015, 3:46 p.m. | OK | FPC | TESTS | 60 | 31 | 409600 | 2300 | |
14620052 | ez_zkj | C | Dec. 2, 2015, 1:37 p.m. | OK | FPC | TESTS | 60 | 46 | 0 | 2300 | |
15041779 | Lightning34 | C | Dec. 27, 2015, 10:05 a.m. | OK | GNU C++ | TESTS | 60 | 15 | 0 | 2300 | |
14696043 | 19891101 | C | Dec. 8, 2015, 9:48 a.m. | OK | GNU C++ | TESTS | 60 | 15 | 0 | 2300 | |
32538298 | yylidiw | C | Nov. 22, 2017, 1:17 a.m. | OK | GNU C++ | TESTS | 60 | 15 | 0 | 2300 | |
16644298 | lcr | C | March 11, 2016, 7:21 a.m. | OK | GNU C++ | TESTS | 60 | 15 | 0 | 2300 | |
28381275 | Ajatar | C | July 9, 2017, 5:49 a.m. | OK | GNU C++ | TESTS | 60 | 15 | 1945600 | 2300 | |
35670089 | Scut82 | C | Feb. 25, 2018, 6:38 a.m. | OK | GNU C++ | TESTS | 60 | 15 | 2048000 | 2300 | |
18182063 | jszyxw | C | June 1, 2016, 12:30 p.m. | OK | GNU C++ | TESTS | 60 | 15 | 2252800 | 2300 | |
16970245 | jcvb | C | March 27, 2016, 11:33 a.m. | OK | GNU C++ | TESTS | 60 | 15 | 2355200 | 2300 | |
18182909 | vjtest | C | June 1, 2016, 1:23 p.m. | OK | GNU C++ | TESTS | 60 | 15 | 2662400 | 2300 | |
18182886 | jackielei | C | June 1, 2016, 1:21 p.m. | OK | GNU C++ | TESTS | 60 | 15 | 2662400 | 2300 | |
15164716 | bsrkaditya | C | Jan. 3, 2016, 5:06 a.m. | OK | GNU C11 | TESTS | 60 | 31 | 0 | 2300 | |
60320216 | rainboy | C | Sept. 9, 2019, 8:03 p.m. | OK | GNU C11 | TESTS | 60 | 46 | 0 | 2300 | |
16341661 | I_love_code | C | Feb. 26, 2016, 7:37 a.m. | OK | GNU C++11 | TESTS | 60 | 15 | 0 | 2300 | |
15820050 | austin990301 | C | Feb. 5, 2016, 7 a.m. | OK | GNU C++11 | TESTS | 60 | 15 | 0 | 2300 | |
14597902 | ExfJoe | C | Dec. 1, 2015, 4:49 p.m. | OK | GNU C++11 | TESTS | 60 | 15 | 0 | 2300 | |
16341719 | I_love_code | C | Feb. 26, 2016, 7:43 a.m. | OK | GNU C++11 | TESTS | 60 | 15 | 0 | 2300 | |
17032402 | ctlchild | C | March 30, 2016, 11:14 a.m. | OK | GNU C++11 | TESTS | 60 | 15 | 0 | 2300 | |
20353773 | jiyutian | C | Sept. 3, 2016, 6:12 a.m. | OK | GNU C++11 | TESTS | 60 | 15 | 204800 | 2300 | |
14647281 | AcrossTheSky | C | Dec. 4, 2015, 12:03 p.m. | OK | GNU C++11 | TESTS | 60 | 15 | 1638400 | 2300 | |
14595952 | Al.Cash | C | Dec. 1, 2015, 4:34 p.m. | OK | GNU C++11 | TESTS | 60 | 30 | 0 | 2300 | |
14699223 | tanphatls987 | C | Dec. 8, 2015, 2:16 p.m. | OK | GNU C++11 | TESTS | 60 | 30 | 0 | 2300 | |
14671253 | darkcrawler | C | Dec. 6, 2015, 4:12 a.m. | OK | GNU C++11 | TESTS | 60 | 30 | 0 | 2300 | |
25779067 | platypus179 | C | March 24, 2017, 5:04 p.m. | OK | GNU C++14 | TESTS | 60 | 15 | 22016000 | 2300 | |
30320853 | King | C | Sept. 14, 2017, 5:49 a.m. | OK | GNU C++14 | TESTS | 60 | 31 | 102400 | 2300 | |
27701361 | SmokeOut | C | June 10, 2017, 7:02 a.m. | OK | GNU C++14 | TESTS | 60 | 31 | 409600 | 2300 | |
30607806 | waynetuinfor | C | Sept. 22, 2017, 7 a.m. | OK | GNU C++14 | TESTS | 60 | 31 | 512000 | 2300 | |
29304164 | ryo_issy | C | Aug. 9, 2017, 11:13 a.m. | OK | GNU C++14 | TESTS | 60 | 31 | 2355200 | 2300 | |
33853342 | kefaa2 | C | Jan. 1, 2018, 6:48 p.m. | OK | GNU C++14 | TESTS | 60 | 31 | 2662400 | 2300 | |
24540595 | StillFantasy | C | Feb. 9, 2017, 3:55 a.m. | OK | GNU C++14 | TESTS | 60 | 31 | 2764800 | 2300 | |
28936375 | shadowatyy | C | July 27, 2017, 6:34 p.m. | OK | GNU C++14 | TESTS | 60 | 31 | 3891200 | 2300 | |
59386905 | vjudge3 | C | Aug. 24, 2019, 6:49 a.m. | OK | GNU C++14 | TESTS | 60 | 46 | 0 | 2300 | |
59316734 | nabid_anzum | C | Aug. 22, 2019, 5:03 p.m. | OK | GNU C++14 | TESTS | 60 | 46 | 0 | 2300 | |
68611830 | yhchang3 | C | Jan. 11, 2020, 3:59 p.m. | OK | GNU C++17 | TESTS | 60 | 46 | 0 | 2300 | |
69389653 | vjudge4 | C | Jan. 23, 2020, 2:26 a.m. | OK | GNU C++17 | TESTS | 60 | 46 | 0 | 2300 | |
69275424 | ijmg | C | Jan. 22, 2020, 1:38 a.m. | OK | GNU C++17 | TESTS | 60 | 46 | 0 | 2300 | |
69265410 | vjudge2 | C | Jan. 21, 2020, 6:26 p.m. | OK | GNU C++17 | TESTS | 60 | 46 | 0 | 2300 | |
69250755 | vjudge5 | C | Jan. 21, 2020, 2:12 p.m. | OK | GNU C++17 | TESTS | 60 | 46 | 0 | 2300 | |
68678740 | Jester | C | Jan. 12, 2020, 8:07 p.m. | OK | GNU C++17 | TESTS | 60 | 46 | 0 | 2300 | |
68105051 | ruo | C | Jan. 3, 2020, 6:31 a.m. | OK | GNU C++17 | TESTS | 60 | 46 | 0 | 2300 | |
67183071 | lucas3h | C | Dec. 19, 2019, 1:55 a.m. | OK | GNU C++17 | TESTS | 60 | 46 | 0 | 2300 | |
64772908 | vjudge4 | C | Nov. 13, 2019, 1:42 a.m. | OK | GNU C++17 | TESTS | 60 | 46 | 0 | 2300 | |
61880134 | ivan100sic | C | Oct. 4, 2019, 10:39 p.m. | OK | GNU C++17 | TESTS | 60 | 46 | 0 | 2300 | |
14610705 | ftiasch | C | Dec. 2, 2015, 2:04 a.m. | OK | Haskell | TESTS | 60 | 171 | 24371200 | 2300 | |
14605018 | cvm | C | Dec. 1, 2015, 6:15 p.m. | OK | Java 7 | TESTS | 60 | 124 | 0 | 2300 | |
14596981 | fromWork | C | Dec. 1, 2015, 4:42 p.m. | OK | Java 7 | TESTS | 60 | 140 | 0 | 2300 | |
14590670 | Petr | C | Dec. 1, 2015, 4 p.m. | OK | Java 7 | TESTS | 60 | 140 | 0 | 2300 | |
14700377 | alibaba | C | Dec. 8, 2015, 3:39 p.m. | OK | Java 7 | TESTS | 60 | 155 | 0 | 2300 | |
14625952 | gpita | C | Dec. 2, 2015, 8:53 p.m. | OK | Java 7 | TESTS | 60 | 280 | 0 | 2300 | |
45134948 | PrakharJain | C | Oct. 31, 2018, 11:57 a.m. | OK | Java 8 | TESTS | 60 | 124 | 0 | 2300 | |
14608706 | AlexFetisov | C | Dec. 1, 2015, 9:56 p.m. | OK | Java 8 | TESTS | 60 | 124 | 0 | 2300 | |
17280681 | sandun | C | April 11, 2016, 4:24 p.m. | OK | Java 8 | TESTS | 60 | 140 | 0 | 2300 | |
15770035 | Arthur | C | Feb. 3, 2016, 2:05 p.m. | OK | Java 8 | TESTS | 60 | 140 | 0 | 2300 | |
15669737 | whhone | C | Jan. 30, 2016, 12:10 a.m. | OK | Java 8 | TESTS | 60 | 140 | 0 | 2300 | |
14797853 | hunglv.k52tncntt | C | Dec. 14, 2015, 6:13 a.m. | OK | Java 8 | TESTS | 60 | 140 | 0 | 2300 | |
14593696 | ilyakor | C | Dec. 1, 2015, 4:18 p.m. | OK | Java 8 | TESTS | 60 | 140 | 0 | 2300 | |
19920039 | hama-du | C | Aug. 17, 2016, 5:26 a.m. | OK | Java 8 | TESTS | 60 | 140 | 20275200 | 2300 | |
14702934 | Sumeet.Varma | C | Dec. 8, 2015, 7:03 p.m. | OK | Java 8 | TESTS | 60 | 155 | 0 | 2300 | |
14626924 | mkirsche | C | Dec. 2, 2015, 11:20 p.m. | OK | Java 8 | TESTS | 60 | 155 | 0 | 2300 | |
15384038 | eddy | C | Jan. 15, 2016, 7:23 a.m. | OK | MS C# | TESTS | 60 | 77 | 10444800 | 2300 | |
14601151 | azukun | C | Dec. 1, 2015, 5:16 p.m. | OK | MS C# | TESTS | 60 | 77 | 13926400 | 2300 | |
15749670 | Maks_DP | C | Feb. 2, 2016, 12:22 p.m. | OK | MS C++ | TESTS | 60 | 31 | 0 | 2300 | |
14860062 | Xhark | C | Dec. 18, 2015, 11:50 a.m. | OK | MS C++ | TESTS | 60 | 31 | 0 | 2300 | |
14632116 | MrKaStep | C | Dec. 3, 2015, 10:23 a.m. | OK | MS C++ | TESTS | 60 | 31 | 0 | 2300 | |
59391021 | vjudge5 | C | Aug. 24, 2019, 8:31 a.m. | OK | MS C++ | TESTS | 60 | 31 | 409600 | 2300 | |
14634354 | Death_Knight_DK | C | Dec. 3, 2015, 1:29 p.m. | OK | MS C++ | TESTS | 60 | 31 | 409600 | 2300 | |
14602688 | Taube | C | Dec. 1, 2015, 5:29 p.m. | OK | MS C++ | TESTS | 60 | 31 | 409600 | 2300 | |
14595778 | ballon | C | Dec. 1, 2015, 4:33 p.m. | OK | MS C++ | TESTS | 60 | 31 | 409600 | 2300 | |
14597757 | AleksanderBalobanov | C | Dec. 1, 2015, 4:48 p.m. | OK | MS C++ | TESTS | 60 | 31 | 12083200 | 2300 | |
63388272 | vjudge1 | C | Oct. 25, 2019, 2:25 p.m. | OK | MS C++ | TESTS | 60 | 46 | 0 | 2300 | |
63387472 | vjudge1 | C | Oct. 25, 2019, 2:11 p.m. | OK | MS C++ | TESTS | 60 | 46 | 0 | 2300 | |
14599542 | pflueger | C | Dec. 1, 2015, 5:03 p.m. | OK | PyPy 2 | TESTS | 60 | 109 | 7680000 | 2300 | |
14599415 | nwi | C | Dec. 1, 2015, 5:01 p.m. | OK | Python 2 | TESTS | 60 | 187 | 7680000 | 2300 | |
14622483 | Ryannnnnnn | C | Dec. 2, 2015, 4:04 p.m. | OK | Python 3 | TESTS | 60 | 187 | 6963200 | 2300 | |
35522141 | yugle7 | C | Feb. 20, 2018, 1:18 p.m. | OK | Python 3 | TESTS | 60 | 234 | 13004800 | 2300 | |
35522322 | yugle7 | C | Feb. 20, 2018, 1:25 p.m. | OK | Python 3 | TESTS | 60 | 249 | 13004800 | 2300 | |
42136194 | Mk_Python_v1 | C | Aug. 27, 2018, 12:14 a.m. | OK | Python 3 | TESTS | 60 | 296 | 7372800 | 2300 |
Back to search problems