Codeforces Round 931 (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
1934 Codeforces Round 931 (Div. 2) FINISHED False 7200 27876263 March 1, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1432 ) D2 XOR Break --- Game Version PROGRAMMING bitmasks games greedy interactive

B'This is an interactive problem. This is the game version of the problem. Note that the solution of this problem may or may not share ideas with the solution of the solo version. You can solve and get points for both versions independently. Alice and Bob are playing a game. The game starts with a positive integer n , with players taking turns. On each turn of the game, the following sequence of events takes place: As Alice, your goal is to win. You can execute a maximum of 63 break operations. You have the choice to play first or second. The system will act for Bob. Here oplus denotes the bitwise XOR operation. Each test contains multiple test cases. The first line of input contains a single integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The only line of each test case contains a single integer n ( 1 <= q n <= q 10^{18} ) -- the number the game starts with. For each test case, the interaction begins by reading the integer n . After reading n , print a single line containing either "first" or "second", denoting what you want to play as (as first or second correspondingly). On Alice 's turn, you are required to print two positive integers, p_{1} and p_{2} such that 0 lt p_{1} lt p , 0 lt p_{2} lt p and p_{1} oplus p_{2} = p . Here, p equals one of the two integers printed by Bob in the previous turn. If no turn has occurred previously, p is equal to n . If Alice cannot perform a break operation, print "0 0" to receive a Wrong answer verdict. On Bob 's turn, you should read two integers, p_{1} and p_{2} such that 0 lt p_{1} lt p , 0 lt p_{2} lt p and p_{1} oplus p_{2} = p . Here, p equals one of the two integers printed by Alice in the previous turn. If no turn has occurred previously, p is equal to n . If Bob cannot perform a break operation p_{1} = 0 and p_2 = 0 in which case you shou'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
249175880 rainboy D2 March 1, 2024, 5:09 p.m. OK GNU C11 TESTS 30 358 0
249225562 ElBe D2 March 2, 2024, 1:05 a.m. OK GNU C++17 TESTS 30 280 0
249179269 ShirayukiNoa D2 March 1, 2024, 5:21 p.m. OK GNU C++17 TESTS 30 295 0
249243873 Jasonwei08 D2 March 2, 2024, 4:52 a.m. OK GNU C++17 TESTS 30 296 0
249204695 parlimoos D2 March 1, 2024, 8:01 p.m. OK GNU C++17 TESTS 30 296 0
249179434 Greenscreen23 D2 March 1, 2024, 5:22 p.m. OK GNU C++17 TESTS 30 296 307200
249204995 parlimoos D2 March 1, 2024, 8:03 p.m. OK GNU C++17 TESTS 30 311 0
249171866 Yhs_Joker D2 March 1, 2024, 4:34 p.m. OK GNU C++17 TESTS 30 311 0
249170052 LittleKoala D2 March 1, 2024, 4:32 p.m. OK GNU C++17 TESTS 30 311 0
249204392 Shuklaayush D2 March 1, 2024, 7:58 p.m. OK GNU C++17 TESTS 30 311 0
249180775 gs25 D2 March 1, 2024, 5:27 p.m. OK GNU C++17 TESTS 30 311 307200
249209554 prakhar2704 D2 March 1, 2024, 8:45 p.m. OK GNU C++17 (64) TESTS 30 249 0
249246557 decade_66 D2 March 2, 2024, 5:14 a.m. OK GNU C++17 (64) TESTS 30 249 0
249176846 --tofu-- D2 March 1, 2024, 5:12 p.m. OK GNU C++17 (64) TESTS 30 264 0
249180499 I3J03RN D2 March 1, 2024, 5:26 p.m. OK GNU C++17 (64) TESTS 30 264 0
249188998 Sahilamin219 D2 March 1, 2024, 6:13 p.m. OK GNU C++17 (64) TESTS 30 296 0
249222416 21cs01033 D2 March 2, 2024, 12:05 a.m. OK GNU C++17 (64) TESTS 30 311 0
249187454 Edu175 D2 March 1, 2024, 6:04 p.m. OK GNU C++17 (64) TESTS 30 311 0
249178641 PUFL D2 March 1, 2024, 5:19 p.m. OK GNU C++17 (64) TESTS 30 342 0
249250936 SkySummer D2 March 2, 2024, 5:46 a.m. OK GNU C++17 (64) TESTS 30 342 0
249176780 floweria D2 March 1, 2024, 5:12 p.m. OK GNU C++17 (64) TESTS 30 342 1638400
249181699 ApuYe D2 March 1, 2024, 5:32 p.m. OK GNU C++20 (64) TESTS 30 218 0
249170474 MateiKing80 D2 March 1, 2024, 4:32 p.m. OK GNU C++20 (64) TESTS 30 233 0
249217976 FedeNQ D2 March 1, 2024, 10:27 p.m. OK GNU C++20 (64) TESTS 30 233 0
249190724 Actium D2 March 1, 2024, 6:23 p.m. OK GNU C++20 (64) TESTS 30 233 0
249183266 RomkaRS D2 March 1, 2024, 5:40 p.m. OK GNU C++20 (64) TESTS 30 233 0
249182462 the_hyp0cr1t3 D2 March 1, 2024, 5:36 p.m. OK GNU C++20 (64) TESTS 30 233 0
249176397 Mohamed_Reda D2 March 1, 2024, 5:10 p.m. OK GNU C++20 (64) TESTS 30 233 0
249175757 palayutm D2 March 1, 2024, 5:09 p.m. OK GNU C++20 (64) TESTS 30 233 0
249180788 haozzZ D2 March 1, 2024, 5:28 p.m. OK GNU C++20 (64) TESTS 30 233 7987200
249220649 IvanRenison D2 March 1, 2024, 11:20 p.m. OK GNU C++20 (64) TESTS 30 234 0
249209926 WORTH D2 March 1, 2024, 8:48 p.m. OK Java 21 TESTS 30 1044 1228800
249189352 profchi D2 March 1, 2024, 6:15 p.m. OK Java 21 TESTS 30 1341 819200
249212039 gardengnome D2 March 1, 2024, 9:10 p.m. OK PyPy 3-64 TESTS 30 1076 9011200
249176183 strashila D2 March 1, 2024, 5:10 p.m. OK PyPy 3-64 TESTS 30 1091 8499200
249227450 RobinFromTheHood D2 March 2, 2024, 1:43 a.m. OK PyPy 3-64 TESTS 30 1091 9523200
249229540 mikeac D2 March 2, 2024, 2:19 a.m. OK PyPy 3-64 TESTS 30 1123 9523200
249203515 cybsbbb D2 March 1, 2024, 7:51 p.m. OK PyPy 3-64 TESTS 30 1138 9420800
249207839 gardengnome D2 March 1, 2024, 8:29 p.m. OK PyPy 3-64 TESTS 30 1154 9625600
249229355 mikeac D2 March 2, 2024, 2:15 a.m. OK PyPy 3-64 TESTS 30 1200 9318400
249191958 Edu175 D2 March 1, 2024, 6:30 p.m. OK PyPy 3-64 TESTS 30 1356 10342400
249204262 DeepJ D2 March 1, 2024, 7:57 p.m. OK PyPy 3-64 TESTS 30 1481 10649600
249176319 naughty-rabbit D2 March 1, 2024, 5:10 p.m. OK PyPy 3-64 TESTS 30 1497 10342400
249183341 htnhtn D2 March 1, 2024, 5:41 p.m. OK Python 3 TESTS 30 1138 102400
249195093 kost D2 March 1, 2024, 6:50 p.m. OK Rust 2021 TESTS 30 499 0

remove filters

Back to search problems