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 |
---|---|---|---|---|---|---|
1033 | Lyft Level 5 Challenge 2018 - Elimination Round | FINISHED | False | 7200 | 198593724 | Oct. 7, 2018, 5:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 390 ) | G | Chip Game | PROGRAMMING | games | 3200 |
B'Alice and Bob decided to play one ultimate game. They have n piles, the i -th pile initially contain v_i chips. Alice selects a positive integer a from interval [1, m] , and Bob selects a number b the same way. Then the game starts. In her turn, Alice can select any pile containing at least a chips, and remove exactly a chips from it. Similarly, in his turn, Bob can choose any pile with at least b chips, and remove exactly b chips from it. If a player cannot make a move, he or she loses. If both players play optimally, the outcome ultimately depends on the choice of a and b , and on the starting player. Consider a fixed pair (a,b) . There are four types of games: Among all choices of a and b (i.e. for each pair (a, b) such that 1 <= q a, b <= q m ), determine how many games are won by Alice (regardless of who starts), how many are won by Bob (regardless of who starts), how many are won by the first player, and how many are won by the second player. The first line contains two integers n and m ( 1 <= q n <= q 100, 1 <= q m <= q 10^5 ) -- the number of piles, and the upper bound on the number of chips allowed to be taken in one turn, respectively. The second line contains n integers v_1, v_2, ... , v_n ( 1 <= q v_i <= q 10^{18} ) -- the starting number of chips in each pile. Print a single line containing four integers w_a , w_b , w_f , w_s -- the number of games won by Alice, Bob, the first player, the second player, respectively. In the first sample, there are a total of four choices for the tuple (a,b) . In the second sample, a lot of games, e.g. a = 7 and b = 6 , end without anybody being able to remove single chip -- which counts as a win for the second player. The games won for the first player are (1, 1) , (1, 4) , (2, 3) , (3, 2) , (4, 1) , and (5'... |
The Lyft Level 5 Challenge 2018 Elimination Round (Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
57868722 | lopare | G | July 27, 2019, 11:35 p.m. | OK | GNU C++11 | TESTS | 63 | 405 | 0 | 3200 | |
43994486 | skywalkert | G | Oct. 8, 2018, 10:48 a.m. | OK | GNU C++11 | TESTS | 63 | 436 | 0 | 3200 | |
44255522 | S.A.O_3 | G | Oct. 13, 2018, 12:12 p.m. | OK | GNU C++11 | TESTS | 63 | 467 | 0 | 3200 | |
44059806 | nhho | G | Oct. 10, 2018, 4:49 a.m. | OK | GNU C++11 | TESTS | 63 | 499 | 0 | 3200 | |
44181930 | krijgertje | G | Oct. 12, 2018, 11:40 a.m. | OK | GNU C++11 | TESTS | 63 | 514 | 0 | 3200 | |
44469577 | scott_wu | G | Oct. 18, 2018, 5:28 a.m. | OK | GNU C++11 | TESTS | 63 | 577 | 0 | 3200 | |
51935309 | flyFeather | G | March 28, 2019, 12:14 p.m. | OK | GNU C++11 | TESTS | 63 | 686 | 0 | 3200 | |
44175385 | Timsei | G | Oct. 12, 2018, 8:36 a.m. | OK | GNU C++11 | TESTS | 63 | 686 | 4812800 | 3200 | |
66401764 | sshwyR | G | Dec. 6, 2019, 12:30 p.m. | OK | GNU C++11 | TESTS | 63 | 717 | 0 | 3200 | |
44018798 | ditoly | G | Oct. 9, 2018, 1:28 a.m. | OK | GNU C++11 | TESTS | 63 | 733 | 0 | 3200 | |
44002490 | consecutivelimit | G | Oct. 8, 2018, 2:20 p.m. | OK | GNU C++14 | TESTS | 63 | 421 | 0 | 3200 | |
66394048 | ZZZZZZZZZZZZZZZZZZ | G | Dec. 6, 2019, 10:08 a.m. | OK | GNU C++14 | TESTS | 63 | 467 | 0 | 3200 | |
44221192 | satyam.pandey | G | Oct. 12, 2018, 5:20 p.m. | OK | GNU C++14 | TESTS | 63 | 624 | 0 | 3200 | |
44062264 | MeePwn | G | Oct. 10, 2018, 6:47 a.m. | OK | GNU C++14 | TESTS | 63 | 686 | 0 | 3200 | |
61223541 | dinesh_1997 | G | Sept. 24, 2019, 2:33 p.m. | OK | GNU C++14 | TESTS | 63 | 748 | 0 | 3200 | |
44180445 | raj_13ee | G | Oct. 12, 2018, 11:01 a.m. | OK | GNU C++14 | TESTS | 63 | 748 | 0 | 3200 | |
43982868 | tritanngo99 | G | Oct. 8, 2018, 4:37 a.m. | OK | GNU C++14 | TESTS | 63 | 811 | 0 | 3200 | |
43982577 | ntt_vn_1999 | G | Oct. 8, 2018, 4:21 a.m. | OK | GNU C++14 | TESTS | 63 | 811 | 0 | 3200 | |
61116176 | Scut82 | G | Sept. 23, 2019, 12:56 p.m. | OK | GNU C++14 | TESTS | 63 | 826 | 0 | 3200 | |
61116552 | Scut82 | G | Sept. 23, 2019, 1:03 p.m. | OK | GNU C++14 | TESTS | 63 | 841 | 0 | 3200 | |
48926530 | Shayan.P | G | Jan. 25, 2019, 10:45 a.m. | OK | GNU C++17 | TESTS | 63 | 280 | 307200 | 3200 | |
69951033 | gongsuidashen | G | Feb. 1, 2020, 8:56 a.m. | OK | GNU C++17 | TESTS | 63 | 295 | 0 | 3200 | |
66291510 | Xellos | G | Dec. 4, 2019, 11:15 p.m. | OK | GNU C++17 | TESTS | 63 | 358 | 0 | 3200 | |
44751711 | ReaLNero1 | G | Oct. 23, 2018, 8:18 p.m. | OK | GNU C++17 | TESTS | 63 | 420 | 0 | 3200 | |
44007105 | NguyenNgocThoai | G | Oct. 8, 2018, 4:24 p.m. | OK | GNU C++17 | TESTS | 63 | 421 | 0 | 3200 | |
44031724 | paulica | G | Oct. 9, 2018, 11:09 a.m. | OK | GNU C++17 | TESTS | 63 | 655 | 307200 | 3200 | |
50884565 | kczno1 | G | March 6, 2019, 10:38 a.m. | OK | GNU C++17 | TESTS | 63 | 780 | 0 | 3200 | |
43970823 | V--o_o--V | G | Oct. 7, 2018, 6:58 p.m. | OK | GNU C++17 | TESTS | 63 | 858 | 0 | 3200 | |
68867319 | Amiton7 | G | Jan. 15, 2020, 1:59 p.m. | OK | GNU C++17 | TESTS | 63 | 1029 | 0 | 3200 | |
48705978 | _Happy_New_Year_ | G | Jan. 22, 2019, 5:55 a.m. | OK | GNU C++17 | TESTS | 63 | 1060 | 307200 | 3200 | |
61520307 | AryssonFigueiredo | G | Sept. 29, 2019, 7:21 p.m. | OK | Java 8 | TESTS | 63 | 873 | 0 | 3200 | |
43972868 | Lewin | G | Oct. 7, 2018, 8 p.m. | OK | Java 8 | TESTS | 63 | 2198 | 0 | 3200 |
Back to search problems