Good Bye 2018

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
1091 Good Bye 2018 FINISHED False 9600 191345124 Dec. 30, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 433 ) H New Year and the Tricolore Recreation PROGRAMMING games 3100

B"Alice and Bob play a game on a grid with n rows and infinitely many columns. In each row, there are three tokens, blue, white and red one. Before the game starts and after every move, the following two conditions must hold: First, they pick a positive integer f , whose value is valid for the whole game. Second, the starting player is chosen and makes his or her first turn. Then players take alternating turns. The player who is unable to make a move loses. During a move, a player first selects an integer k that is either a prime number or a product of two (not necessarily distinct) primes. The smallest possible values of k are thus 2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 19, ... . Furthermore, k must not be equal to the previously picked integer f . Each turn, a move is performed in exactly one of the rows. If it is Alice's turn, she chooses a single blue token and moves it k cells to the right. Alternatively, she may move both the blue and the white token in the same row by the same amount k to the right. On the other hand, Bob selects a single red token and moves it k cells to the left. Similarly, he may also move the white and the red token in the corresponding row by k to the left. Note that Alice may never move a red token, while Bob may never move a blue one. Remember that after a move, the two conditions on relative positions of the tokens must still hold. Both players play optimally. Given the initial state of the board, determine who wins for two games: if Alice starts and if Bob starts. The first line contains a two integers n and f ( 1 <= q n <= q 10^5 , 2 <= q f <= q 2 cdot 10^5 ) -- the number of rows and the forbidden move, respectively. Each of the next n lines contains three integers b_i , w_i , r_i ( -10^5 <= q b_i < w_i < r_i <= q 10^5 ) -- the number of column in which the blue, white and red token lies in the $$"...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
48654513 ReaLNero1 H Jan. 21, 2019, 1:36 a.m. OK GNU C++11 TESTS 86 717 2969600 3100
47771045 scott_wu H Dec. 30, 2018, 9:12 p.m. OK GNU C++11 TESTS 86 717 2969600 3100
47770993 scott_wu H Dec. 30, 2018, 9:09 p.m. OK GNU C++11 TESTS 86 873 2969600 3100
50627008 code_struck H March 1, 2019, 6:42 a.m. OK GNU C++11 TESTS 86 936 3481600 3100
47785931 voidmax H Dec. 31, 2018, 10:42 a.m. OK GNU C++11 TESTS 86 982 4198400 3100
50626969 code_struck H March 1, 2019, 6:41 a.m. OK GNU C++11 TESTS 86 998 3481600 3100
50626358 code_struck H March 1, 2019, 6:17 a.m. OK GNU C++11 TESTS 86 1029 3788800 3100
47944176 bigcrunch H Jan. 4, 2019, 6:41 p.m. OK GNU C++11 TESTS 86 1387 4096000 3100
47836084 cuizhuyefei H Jan. 2, 2019, 10:20 a.m. OK GNU C++11 TESTS 86 1465 8192000 3100
50626796 code_struck H March 1, 2019, 6:34 a.m. OK GNU C++11 TESTS 86 1481 3788800 3100
50272714 liouzhou_101 H Feb. 21, 2019, 8:12 a.m. OK GNU C++14 TESTS 86 187 5427200 3100
50272510 liouzhou_101 H Feb. 21, 2019, 8:07 a.m. OK GNU C++14 TESTS 86 187 5427200 3100
50272951 liouzhou_101 H Feb. 21, 2019, 8:20 a.m. OK GNU C++14 TESTS 86 187 6246400 3100
50271836 liouzhou_101 H Feb. 21, 2019, 7:45 a.m. OK GNU C++14 TESTS 86 639 5427200 3100
50271058 liouzhou_101 H Feb. 21, 2019, 7:18 a.m. OK GNU C++14 TESTS 86 639 5427200 3100
50271752 liouzhou_101 H Feb. 21, 2019, 7:42 a.m. OK GNU C++14 TESTS 86 655 5427200 3100
50269503 liouzhou_101 H Feb. 21, 2019, 6:27 a.m. OK GNU C++14 TESTS 86 655 5529600 3100
50270661 liouzhou_101 H Feb. 21, 2019, 7:05 a.m. OK GNU C++14 TESTS 86 686 5427200 3100
50271635 liouzhou_101 H Feb. 21, 2019, 7:38 a.m. OK GNU C++14 TESTS 86 702 5427200 3100
50271572 liouzhou_101 H Feb. 21, 2019, 7:35 a.m. OK GNU C++14 TESTS 86 702 5427200 3100
47783310 karasek H Dec. 31, 2018, 9:19 a.m. OK GNU C++17 TESTS 86 686 4096000 3100
47797229 redotter H Dec. 31, 2018, 6:10 p.m. OK GNU C++17 TESTS 86 811 3891200 3100
47797146 redotter H Dec. 31, 2018, 6:05 p.m. OK GNU C++17 TESTS 86 842 4096000 3100
47797131 redotter H Dec. 31, 2018, 6:05 p.m. OK GNU C++17 TESTS 86 842 5427200 3100
47797256 redotter H Dec. 31, 2018, 6:12 p.m. OK GNU C++17 TESTS 86 873 3788800 3100
47797249 redotter H Dec. 31, 2018, 6:12 p.m. OK GNU C++17 TESTS 86 873 3788800 3100
47797103 redotter H Dec. 31, 2018, 6:03 p.m. OK GNU C++17 TESTS 86 873 8192000 3100
47767976 Benq H Dec. 30, 2018, 6:59 p.m. OK GNU C++17 TESTS 86 888 3686400 3100
47797216 redotter H Dec. 31, 2018, 6:10 p.m. OK GNU C++17 TESTS 86 889 3891200 3100
47767319 riadwaw H Dec. 30, 2018, 6:43 p.m. OK GNU C++17 TESTS 86 904 3891200 3100
47756732 eatmore H Dec. 30, 2018, 4:15 p.m. OK Java 8 TESTS 86 1653 0 3100
47855824 tri H Jan. 2, 2019, 9:59 p.m. OK Java 8 TESTS 86 3416 0 3100

remove filters

Back to search problems