2023-2024 ICPC, Asia Jakarta Regional Contest (Online Mirror, Unrated, ICPC Rules, Teams Preferred)

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
1906 2023-2024 ICPC, Asia Jakarta Regional Contest (Online Mirror, Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 35601863 Dec. 3, 2023, 4:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 221 ) G Grid Game 2 PROGRAMMING games number theory

B'You are playing "Grid Game 2" with your friend. There is a grid with 10^9 rows (numbered from 1 to 10^9 ) and 10^9 columns (numbered from 1 to 10^9 ). The cell at row r and column c is denoted as (r, c) . Each cell can have a colour of either black or white. Initially, there are exactly N black cells (numbered from 1 to N ). Black cell i is located at (R_i, C_i) . The rest of the cells are white. You and your friend will alternately take turn playing on this grid, and you are playing in the first turn. In one turn, a player will choose a black cell (r, c) , then toggle cells (r - x, c - y) for all 0 <= q x, y < min(r, c) . If a cell is toggled, then the cell becomes black if it was a white cell, and the cell becomes white if it was a black cell. For example, the following illustration shows how the grid changes after a player chooses a black cell (5, 4) in their turn. A player who is unable to play on their turn, i.e. no remaining black cells, loses the game, and the opposing player wins the game. If you and your friend are playing optimally, determine who will win the game. The first line consists of an integer N ( 1 <= N <= 200 ,000 ). Each of the next N lines consists of two integers R_i C_i ( 1 <= q R_i, C_i <= q 10^9) . For 1 <= q i < j <= q N , (R_i, C_i) neq (R_j, C_j) . Output FIRST if you will win the game, or SECOND otherwise. Explanation for the sample input/output #1 You can start your move by choosing (2, 4) , whose effect was demonstrated in the following illustration. The remaining black cells are (1, 3) and (1, 4) , each of which will only toggle itself when chosen. Whichever your friend chooses on the next move, the you can choose the remaining black cell. Explanation for the sample input/output #2 You have only one cell to choose, and will toggle cells (1, 1) , (1, 2) '...

Tutorials

problem_analysis.pdf

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
235485127 PEIMUDA bilibilitdasc Error_Yuan G Dec. 3, 2023, 7:57 a.m. OK GNU C++14 TESTS 26 280 0
235473514 gisp_zjz triple__a Roundgod G Dec. 3, 2023, 6:26 a.m. OK GNU C++17 TESTS 26 234 1024000
235523779 subhasravani G Dec. 3, 2023, 1:06 p.m. OK GNU C++17 TESTS 26 249 0
235515757 Alpha_Q G Dec. 3, 2023, 11:59 a.m. OK GNU C++17 TESTS 26 249 0
235505897 lunilay2002 G Dec. 3, 2023, 10:33 a.m. OK GNU C++17 TESTS 26 249 0
235646793 N_z__ G Dec. 4, 2023, 1:56 a.m. OK GNU C++17 (64) TESTS 26 218 102400
235498216 heno239 G Dec. 3, 2023, 9:30 a.m. OK GNU C++17 (64) TESTS 26 218 8396800
235617251 chappy1 G Dec. 3, 2023, 5:59 p.m. OK GNU C++17 (64) TESTS 26 405 0
235512061 Morphymorphymorphy G Dec. 3, 2023, 11:27 a.m. OK GNU C++17 (64) TESTS 26 420 0
235504167 grass8sheep G Dec. 3, 2023, 10:18 a.m. OK GNU C++17 (64) TESTS 26 421 0
235477989 grass8sheep qiuzx KbltQaQ G Dec. 3, 2023, 7:04 a.m. OK GNU C++17 (64) TESTS 26 421 0
235525812 antekb natofp kobor G Dec. 3, 2023, 1:24 p.m. OK GNU C++20 (64) TESTS 26 187 0
235492942 EternalAlexander installb W4P3R G Dec. 3, 2023, 8:52 a.m. OK GNU C++20 (64) TESTS 26 187 0
235467562 ecnerwala ksun48 G Dec. 3, 2023, 5:23 a.m. OK GNU C++20 (64) TESTS 26 187 0
235525339 Crying G Dec. 3, 2023, 1:20 p.m. OK GNU C++20 (64) TESTS 26 202 1638400
235492357 Kevin114514 Crying GeZhiyuan G Dec. 3, 2023, 8:48 a.m. OK GNU C++20 (64) TESTS 26 202 1638400
235506366 Kuroni G Dec. 3, 2023, 10:37 a.m. OK GNU C++20 (64) TESTS 26 218 0
235495584 cabbit Kuroni G Dec. 3, 2023, 9:11 a.m. OK GNU C++20 (64) TESTS 26 249 0
235516822 zlc1114 G Dec. 3, 2023, 12:08 p.m. OK GNU C++20 (64) TESTS 26 842 15974400
235488119 Handsome2004 G Dec. 3, 2023, 8:19 a.m. OK GNU C++20 (64) TESTS 26 889 1945600
235595454 arvindf232 G Dec. 3, 2023, 4:18 p.m. OK Kotlin 1.6 TESTS 26 451 409600

remove filters

Back to search problems