Testing Round 20 (Unrated, Communication Problems)

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
2168 Testing Round 20 (Unrated, Communication Problems) FINISHED False 3600 14225123 Nov. 3, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 867 ) C Intercepting Butterflies PROGRAMMING bitmasks constructive algorithms graphs interactive

This problem is a run-twice (communication) problem. Alice has an integer (x) where (1 \le x \le 2^{15}), which she needs to send to Bob (an astronaut on the Moon) as it is an important parameter for their secret project on the Moon. Fortunately, Alice has a secret storage device (S), which contains a not necessarily non-empty subset of the set (\{1, 2, \ldots, 20\}). She plans to send (S) to Bob. Bob's goal is to recover the value of (x) using only (S). However, after Alice sends set (S) on a spaceship and before Bob receives (S), magical butterflies had intercepted the spaceship! When Bob finally receives (S), one of the following had occurred: An arbitrary element is removed from (S). This can only be done if (S) is non-empty. An arbitrary element is added to (S). This should still satisfy (S \subseteq \{1, 2, \ldots, 20\}). (S) remained unchanged. Please devise a strategy for Alice and Bob so that Bob can determine the value of (x) regardless of what happened to set (S). Precisely, in this problem your code will be run exactly two times on each test. On the first run, you will act as Alice, and on the second Bob. No additional information other than the set (S) can be transferred from Alice to Bob. To get an Accepted verdict, your code on the second run should be able to exactly recover the integers that were received on the first run. First Run Input The first line of the input contains the string first . The purpose of this is so your program recognizes that this is its first run, and it should act as Alice. The second line of the input contains exactly one integer (t) ((1 \le t \le 10^4)) — the number of test cases. The first and only line of the (i)-th test case contains an integer (x) ((1 \le x \le 2^{15})). Output For each test case, send (S) to Bob by printing two lines in the following manner. On the first line, output an integer (n) ($$$0 \le n

Tutorials

Testing Round 20 Editorial (officially unofficial)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
347272549 Axoryn C Nov. 3, 2025, 2:54 p.m. OK C# 13 TESTS 34 124 3584000
347277624 tddaij C Nov. 3, 2025, 3:15 p.m. OK C# 13 TESTS 34 171 4608000
347321537 ksandr1v C Nov. 3, 2025, 8:28 p.m. OK C# 13 TESTS 34 281 1024000
347330265 mmestrovic C Nov. 3, 2025, 11:33 p.m. OK C++17 (GCC 7-32) TESTS 34 92 102400
347286653 Mr.Perfume C Nov. 3, 2025, 4 p.m. OK C++17 (GCC 7-32) TESTS 34 92 102400
347348109 ComPhyPark C Nov. 4, 2025, 5:07 a.m. OK C++17 (GCC 7-32) TESTS 34 93 0
347273624 M_A_centeno_C C Nov. 3, 2025, 2:58 p.m. OK C++17 (GCC 7-32) TESTS 34 93 0
347332097 DaAsianCarsten C Nov. 4, 2025, 12:23 a.m. OK C++17 (GCC 7-32) TESTS 34 93 102400
347330207 shivam_360 C Nov. 3, 2025, 11:32 p.m. OK C++17 (GCC 7-32) TESTS 34 93 102400
347329912 Electron1997 C Nov. 3, 2025, 11:22 p.m. OK C++17 (GCC 7-32) TESTS 34 93 102400
347329482 Francisco_Martin C Nov. 3, 2025, 11:09 p.m. OK C++17 (GCC 7-32) TESTS 34 93 102400
347327320 VaHiX C Nov. 3, 2025, 10:10 p.m. OK C++17 (GCC 7-32) TESTS 34 93 102400
347317776 ahmadamro99 C Nov. 3, 2025, 7:39 p.m. OK C++17 (GCC 7-32) TESTS 34 93 102400
347342980 flying_saucer C Nov. 4, 2025, 3:51 a.m. OK C++20 (GCC 13-64) TESTS 34 77 102400
347301162 hskyr C Nov. 3, 2025, 5:26 p.m. OK C++20 (GCC 13-64) TESTS 34 77 102400
347282354 asnknwrk C Nov. 3, 2025, 3:36 p.m. OK C++20 (GCC 13-64) TESTS 34 77 102400
347281182 turkhuu622 C Nov. 3, 2025, 3:31 p.m. OK C++20 (GCC 13-64) TESTS 34 77 102400
347281006 LittleOrange666 C Nov. 3, 2025, 3:30 p.m. OK C++20 (GCC 13-64) TESTS 34 77 102400
347275910 StarSilk C Nov. 3, 2025, 3:08 p.m. OK C++20 (GCC 13-64) TESTS 34 77 102400
347272212 dorijanlendvaj C Nov. 3, 2025, 2:53 p.m. OK C++20 (GCC 13-64) TESTS 34 77 102400
347297537 -Berry- C Nov. 3, 2025, 5:03 p.m. OK C++20 (GCC 13-64) TESTS 34 78 0
347277874 Rodger2041 C Nov. 3, 2025, 3:16 p.m. OK C++20 (GCC 13-64) TESTS 34 78 0
347322792 monkey8 C Nov. 3, 2025, 8:46 p.m. OK C++20 (GCC 13-64) TESTS 34 78 102400
347324048 pradeep027 C Nov. 3, 2025, 9:05 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 77 0
347309268 risujiroh C Nov. 3, 2025, 6:21 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 77 0
347292543 Sunb1m C Nov. 3, 2025, 4:33 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 77 0
347286933 HugeMouse C Nov. 3, 2025, 4:01 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 77 0
347282735 madtreap C Nov. 3, 2025, 3:38 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 77 0
347274006 SSerxhs C Nov. 3, 2025, 3 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 77 0
347305370 kreeeesh_17 C Nov. 3, 2025, 5:53 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 77 102400
347287792 binminh01 C Nov. 3, 2025, 4:06 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 77 102400
347282954 TeletubiGaim33 C Nov. 3, 2025, 3:40 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 77 102400
347279960 _Jahongir_ C Nov. 3, 2025, 3:25 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 77 102400
347273352 hos.lyric C Nov. 3, 2025, 2:57 p.m. OK D TESTS 34 171 0
347287190 pengin_2000 C Nov. 3, 2025, 4:03 p.m. OK GNU C11 TESTS 34 1092 8294400
347335007 0x3F C Nov. 4, 2025, 1:37 a.m. OK Go TESTS 34 124 4608000
347334271 0x3F C Nov. 4, 2025, 1:22 a.m. OK Go TESTS 34 124 4608000
347334831 0x3F C Nov. 4, 2025, 1:33 a.m. OK Go TESTS 34 171 4505600
347329333 sahasrad C Nov. 3, 2025, 11:04 p.m. OK Java 21 TESTS 34 327 1945600
347278762 nikhilsingh_21 C Nov. 3, 2025, 3:20 p.m. OK Java 21 TESTS 34 671 2355200
347327833 SoMeQuit C Nov. 3, 2025, 10:22 p.m. OK Java 8 TESTS 34 327 102400
347326442 SoMeQuit C Nov. 3, 2025, 9:52 p.m. OK Java 8 TESTS 34 811 0
347273439 arvindf232 C Nov. 3, 2025, 2:58 p.m. OK Kotlin 2.2 TESTS 34 296 819200
347275170 Tlatoani C Nov. 3, 2025, 3:05 p.m. OK Kotlin 2.2 TESTS 34 327 204800
347325553 stan23456 C Nov. 3, 2025, 9:34 p.m. OK PyPy 3-64 TESTS 34 186 8601600
347285580 _Kee C Nov. 3, 2025, 3:54 p.m. OK PyPy 3-64 TESTS 34 187 8601600
347327470 VaHiX C Nov. 3, 2025, 10:14 p.m. OK PyPy 3-64 TESTS 34 187 8704000
347332221 explainer C Nov. 4, 2025, 12:28 a.m. OK PyPy 3-64 TESTS 34 218 8908800
347349390 mkawa2 C Nov. 4, 2025, 5:23 a.m. OK PyPy 3-64 TESTS 34 218 9625600
347283491 TTO76 C Nov. 3, 2025, 3:43 p.m. OK PyPy 3-64 TESTS 34 234 4505600
347271052 bribritt C Nov. 3, 2025, 2:49 p.m. OK PyPy 3-64 TESTS 34 234 4505600
347328240 ChatIsThisReal C Nov. 3, 2025, 10:33 p.m. OK PyPy 3-64 TESTS 34 264 7168000
347339366 ahaan_desai27 C Nov. 4, 2025, 2:58 a.m. OK PyPy 3-64 TESTS 34 281 6144000
347343215 fatalerror C Nov. 4, 2025, 3:55 a.m. OK PyPy 3-64 TESTS 34 311 10035200
347281102 gargkohina19 C Nov. 3, 2025, 3:30 p.m. OK Python 3 TESTS 34 281 1433600
347281004 sanchali28 C Nov. 3, 2025, 3:30 p.m. OK Python 3 TESTS 34 296 1433600
347280677 DIVI_TAK05 C Nov. 3, 2025, 3:28 p.m. OK Python 3 TESTS 34 296 1433600
347345796 Spheniscine C Nov. 4, 2025, 4:33 a.m. OK Rust 2021 TESTS 34 77 0
347344843 Spheniscine C Nov. 4, 2025, 4:19 a.m. OK Rust 2021 TESTS 34 108 102400
347326193 Svlad_Cjelli C Nov. 3, 2025, 9:47 p.m. OK Rust 2024 TESTS 34 77 102400
347306846 pradeep027 C Nov. 3, 2025, 6:03 p.m. OK Rust 2024 TESTS 34 77 102400
347275155 Dilha_1526 C Nov. 3, 2025, 3:05 p.m. OK Rust 2024 TESTS 34 92 102400
347278481 Egor C Nov. 3, 2025, 3:19 p.m. OK Rust 2024 TESTS 34 374 17203200
347274738 null_lambda C Nov. 3, 2025, 3:03 p.m. OK Rust 2024 TESTS 34 702 9830400

remove filters

Back to search problems