Codeforces Round 912 (Div. 2)

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
1903 Codeforces Round 912 (Div. 2) FINISHED False 8100 30461099 Nov. 30, 2023, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2065 ) E Geo Game PROGRAMMING constructive algorithms dp games greedy interactive math

B"This is an interactive problem. Theofanis and his sister are playing the following game. They have n points in a 2D plane and a starting point (s_x,s_y) . Each player (starting from the first player) chooses one of the n points that wasn't chosen before and adds to the sum (which is initially 0 ) the square of the Euclidean distance from the previous point (which is either the starting point or it was chosen by the other person) to the new point (that the current player selected). The game ends after exactly n moves (after all the points are chosen). The first player wins if the sum is even in the end. Otherwise, the second player wins. Theofanis is a very competitive person and he hates losing. Thus, he wants to choose whether he should play first or second. Can you show him, which player to choose, and how he should play to beat his sister? The first line contains a single integer t ( 1 <= t <= 2000 ) -- the number of test cases. The data for each test case is only available after the end of the interaction (the end of the game) for all previous test cases. The first line of each test case contains a single integer n ( 1 <= n <= 10^{5} ) -- the number of points. The second line of each test case contains two integers s_x , s_y ( 0 <= s_x, s_y <= 10^{9} ) -- the coordinates of the starting point. Two or more points may have the same coordinates. The i -th of the following n lines contains two integers x_i and y_i ( 0 <= x_i, y_i <= 10^{9} ) -- the coordinates of the i -th point. It is guaranteed that the sum of n over all test cases does not exceed 10^{5} . For each test case, you should first output the player that you want to play as (First or Second). Then, you should play the game. When it's your turn, you should output the index j ( 1 <= j <= n ) of the point that you want to choose, and when it's the other player's "...

Tutorials

Codeforces Round #912 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
235127881 mban259 E Nov. 30, 2023, 6:40 p.m. OK C# 10 TESTS 34 716 9318400
235136489 mmfn1996 E Nov. 30, 2023, 7:50 p.m. OK C# 8 TESTS 34 1044 9420800
235116775 reus E Nov. 30, 2023, 5:59 p.m. OK GNU C++14 TESTS 34 577 4505600
235119043 DAleksa E Nov. 30, 2023, 6:07 p.m. OK GNU C++14 TESTS 34 592 4198400
235126858 Bator069 E Nov. 30, 2023, 6:36 p.m. OK GNU C++14 TESTS 34 607 5017600
235135085 TrendBattles E Nov. 30, 2023, 7:39 p.m. OK GNU C++14 TESTS 34 608 3379200
235134788 TrendBattles E Nov. 30, 2023, 7:37 p.m. OK GNU C++14 TESTS 34 624 3379200
235122459 dxh3434 E Nov. 30, 2023, 6:20 p.m. OK GNU C++14 TESTS 34 639 2252800
235124527 animish01 E Nov. 30, 2023, 6:27 p.m. OK GNU C++14 TESTS 34 654 13107200
235118491 NovusStellachan E Nov. 30, 2023, 6:05 p.m. OK GNU C++14 TESTS 34 655 11776000
235154805 bdfs_then_CSDN E Dec. 1, 2023, 1:27 a.m. OK GNU C++14 TESTS 34 670 3379200
235156379 zltzlt E Dec. 1, 2023, 2:01 a.m. OK GNU C++14 TESTS 34 717 5427200
235133760 A_Nafees E Nov. 30, 2023, 7:31 p.m. OK GNU C++17 TESTS 34 529 3379200
235147186 myst-6 E Nov. 30, 2023, 10:18 p.m. OK GNU C++17 TESTS 34 545 3379200
235127684 patou E Nov. 30, 2023, 6:39 p.m. OK GNU C++17 TESTS 34 561 1228800
235129004 ftuknights E Nov. 30, 2023, 6:44 p.m. OK GNU C++17 TESTS 34 561 3379200
235162471 NooB_VansH E Dec. 1, 2023, 3:43 a.m. OK GNU C++17 TESTS 34 561 4198400
235126696 Code937 E Nov. 30, 2023, 6:35 p.m. OK GNU C++17 TESTS 34 561 6041600
235140274 timg8710 E Nov. 30, 2023, 8:28 p.m. OK GNU C++17 TESTS 34 576 3379200
235133716 Macrosteam E Nov. 30, 2023, 7:31 p.m. OK GNU C++17 TESTS 34 576 3379200
235123243 Francesco4203 E Nov. 30, 2023, 6:22 p.m. OK GNU C++17 TESTS 34 576 3379200
235126071 Iura_Shch E Nov. 30, 2023, 6:33 p.m. OK GNU C++17 TESTS 34 576 5017600
235121785 BigHeadCarrot E Nov. 30, 2023, 6:17 p.m. OK GNU C++17 (64) TESTS 34 545 1126400
235123064 ahshafi E Nov. 30, 2023, 6:22 p.m. OK GNU C++17 (64) TESTS 34 545 4915200
235152781 -LAP- E Dec. 1, 2023, 12:42 a.m. OK GNU C++17 (64) TESTS 34 545 5324800
235116367 comensal E Nov. 30, 2023, 5:57 p.m. OK GNU C++17 (64) TESTS 34 545 5632000
235135595 Alkaser_ID E Nov. 30, 2023, 7:43 p.m. OK GNU C++17 (64) TESTS 34 546 6451200
235135017 Ferrriccc E Nov. 30, 2023, 7:39 p.m. OK GNU C++17 (64) TESTS 34 560 5734400
235141054 lvsc__ E Nov. 30, 2023, 8:37 p.m. OK GNU C++17 (64) TESTS 34 561 4915200
235125009 dqu1087 E Nov. 30, 2023, 6:29 p.m. OK GNU C++17 (64) TESTS 34 561 4915200
235125059 jiejie0616 E Nov. 30, 2023, 6:29 p.m. OK GNU C++17 (64) TESTS 34 561 6041600
235123608 ikuyo_kita E Nov. 30, 2023, 6:24 p.m. OK GNU C++17 (64) TESTS 34 561 7270400
235134120 MmusoM E Nov. 30, 2023, 7:33 p.m. OK GNU C++20 (64) TESTS 34 467 3788800
235142016 thanhchauns2 E Nov. 30, 2023, 8:49 p.m. OK GNU C++20 (64) TESTS 34 483 3788800
235136379 OverSimpIified E Nov. 30, 2023, 7:49 p.m. OK GNU C++20 (64) TESTS 34 498 1228800
235129834 eshbak-khay E Nov. 30, 2023, 6:47 p.m. OK GNU C++20 (64) TESTS 34 498 1228800
235114470 pastel E Nov. 30, 2023, 5:51 p.m. OK GNU C++20 (64) TESTS 34 498 2150400
235140958 mahersefo E Nov. 30, 2023, 8:36 p.m. OK GNU C++20 (64) TESTS 34 514 1945600
235116903 lucasxia01 E Nov. 30, 2023, 5:59 p.m. OK GNU C++20 (64) TESTS 34 514 1945600
235124690 Iie E Nov. 30, 2023, 6:28 p.m. OK GNU C++20 (64) TESTS 34 514 2150400
235134971 KiFaH_HeLaL E Nov. 30, 2023, 7:38 p.m. OK GNU C++20 (64) TESTS 34 514 2764800
235117469 Andrew-13 E Nov. 30, 2023, 6:01 p.m. OK GNU C++20 (64) TESTS 34 514 4915200
235116767 KlayThompson11 E Nov. 30, 2023, 5:59 p.m. OK Java 11 TESTS 34 2230 1843200
235150345 CutSandstone E Nov. 30, 2023, 11:38 p.m. OK Java 17 TESTS 34 2105 17100800
235134143 110101011 E Nov. 30, 2023, 7:33 p.m. OK Java 8 TESTS 34 1450 0
235135383 110101011 E Nov. 30, 2023, 7:41 p.m. OK Java 8 TESTS 34 1466 0
235114323 misorin E Nov. 30, 2023, 5:50 p.m. OK PyPy 3-64 TESTS 34 872 9318400
235120885 plevande E Nov. 30, 2023, 6:14 p.m. OK PyPy 3-64 TESTS 34 1357 21913600
235136132 the_last_smilodon E Nov. 30, 2023, 7:47 p.m. OK PyPy 3-64 TESTS 34 1466 43827200
235115601 hxu10 E Nov. 30, 2023, 5:55 p.m. OK PyPy 3-64 TESTS 34 1575 10649600
235153309 liupengsay E Dec. 1, 2023, 12:55 a.m. OK PyPy 3-64 TESTS 34 1575 21401600
235114919 Kita E Nov. 30, 2023, 5:52 p.m. OK PyPy 3-64 TESTS 34 1591 31641600
235122837 shubhargava E Nov. 30, 2023, 6:21 p.m. OK PyPy 3-64 TESTS 34 1606 15667200
235153360 liupengsay E Dec. 1, 2023, 12:56 a.m. OK PyPy 3-64 TESTS 34 1637 21606400
235128892 samriddhjn E Nov. 30, 2023, 6:44 p.m. OK PyPy 3-64 TESTS 34 1684 13414400
235120299 skhan_org E Nov. 30, 2023, 6:11 p.m. OK PyPy 3-64 TESTS 34 1716 25395200

remove filters

Back to search problems