CodeTON Round 3 (Div. 1 + Div. 2, Rated, Prizes!)

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
1750 CodeTON Round 3 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 9000 69521063 Nov. 6, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9725 ) C Complementary XOR PROGRAMMING constructive algorithms data structures

B'You have two binary strings a and b of length n . You would like to make all the elements of both strings equal to 0 . Unfortunately, you can modify the contents of these strings using only the following operation: Your task is to determine if this is possible, and if it is, to find such an appropriate chain of operations. The number of operations should not exceed n + 5 . It can be proven that if such chain of operations exists, one exists with at most n + 5 operations. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 10^5 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 2 <= n <= 2 cdot 10^5 ) -- the length of the strings. The second line of each test case contains a binary string a , consisting only of characters 0 and 1, of length n . The third line of each test case contains a binary string b , consisting only of characters 0 and 1, of length n . It is guaranteed that sum of n over all test cases doesn 't exceed 2 cdot 10^5 . For each testcase, print first "YES" if it 's possible to make all the elements of both strings equal to 0 . Otherwise, print "NO". If the answer is "YES", on the next line print a single integer k ( 0 <= k <= n + 5 ) -- the number of operations. Then k lines follows, each contains two integers l and r ( 1 <= l <= r <= n ) -- the description of the operation. If there are several correct answers, print any of them. In the first test case, we can perform one operation with l = 2 and r = 2 . So a_2 := 1 - 1 = 0 and string a became equal to 000. b_1 := 1 - 1 = 0 , b_3 := 1 - 1 = 0 and string b became equal to 000. In the second and in the third test cases, it can be proven that it 's impossible to make all elements of both string'...

Tutorials

CodeTON Round 3 (Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
179620140 ssvb C Nov. 6, 2022, 4:16 p.m. OK D TESTS 8 265 6144000
179815098 NenadDapic C Nov. 6, 2022, 7 p.m. OK FPC TESTS 8 1029 614400
179782608 1435730 C Nov. 6, 2022, 6:26 p.m. OK GNU C11 TESTS 8 608 1945600
179652522 VerakinT C Nov. 6, 2022, 5:03 p.m. OK GNU C11 TESTS 8 780 409600
179622083 Uanu C Nov. 6, 2022, 4:24 p.m. OK GNU C11 TESTS 8 826 1228800
179831951 CaveNightingale C Nov. 7, 2022, 12:46 a.m. OK GNU C11 TESTS 8 1170 1945600
179626613 LOOP0 C Nov. 6, 2022, 4:40 p.m. OK GNU C11 TESTS 8 1404 2048000
179658719 Remilia0231 C Nov. 6, 2022, 5:04 p.m. OK GNU C++14 TESTS 8 31 5529600
179842605 FrancaisDrake C Nov. 7, 2022, 3:06 a.m. OK GNU C++14 TESTS 8 46 1228800
179840087 Moon_rainbow C Nov. 7, 2022, 2:20 a.m. OK GNU C++14 TESTS 8 46 2048000
179614500 ilija_IR_13 C Nov. 6, 2022, 3:53 p.m. OK GNU C++14 TESTS 8 46 4505600
179832031 Nerovix C Nov. 7, 2022, 12:47 a.m. OK GNU C++14 TESTS 8 61 1638400
179621821 zzhrnoicansolve C Nov. 6, 2022, 4:23 p.m. OK GNU C++14 TESTS 8 61 2764800
179622933 YunYuanWang C Nov. 6, 2022, 4:28 p.m. OK GNU C++14 TESTS 8 61 14028800
179621204 Ghostxxx C Nov. 6, 2022, 4:20 p.m. OK GNU C++14 TESTS 8 61 99225600
179851290 __chtholly__ C Nov. 7, 2022, 3:58 a.m. OK GNU C++14 TESTS 8 62 409600
179615140 513487012 C Nov. 6, 2022, 3:55 p.m. OK GNU C++14 TESTS 8 62 409600
179621197 Anish_Singh_Dhami_07 C Nov. 6, 2022, 4:20 p.m. OK GNU C++17 TESTS 8 46 1638400
179832548 zemin-jiang C Nov. 7, 2022, 1:03 a.m. OK GNU C++17 TESTS 8 61 409600
179620792 dakansa C Nov. 6, 2022, 4:19 p.m. OK GNU C++17 TESTS 8 61 1638400
179615925 LNCYZ C Nov. 6, 2022, 3:58 p.m. OK GNU C++17 TESTS 8 61 2048000
179625975 piyushm28 C Nov. 6, 2022, 4:39 p.m. OK GNU C++17 TESTS 8 61 2457600
179613740 smurfskiy C Nov. 6, 2022, 3:50 p.m. OK GNU C++17 TESTS 8 61 3379200
179622835 alitarekkk C Nov. 6, 2022, 4:28 p.m. OK GNU C++17 TESTS 8 61 3993600
179613807 ErwinSchrodingersCat C Nov. 6, 2022, 3:50 p.m. OK GNU C++17 TESTS 8 61 5632000
179618533 gaurav00s7 C Nov. 6, 2022, 4:09 p.m. OK GNU C++17 TESTS 8 62 716800
179618670 zwh_zzz C Nov. 6, 2022, 4:10 p.m. OK GNU C++17 TESTS 8 62 716800
179614263 Gorulko_Sofia C Nov. 6, 2022, 3:52 p.m. OK GNU C++17 (64) TESTS 8 46 716800
179623129 pinkhippo C Nov. 6, 2022, 4:28 p.m. OK GNU C++17 (64) TESTS 8 46 716800
179633480 Nagrarok C Nov. 6, 2022, 4:57 p.m. OK GNU C++17 (64) TESTS 8 46 1638400
179632440 MrPrizmo C Nov. 6, 2022, 4:54 p.m. OK GNU C++17 (64) TESTS 8 46 2150400
179617822 NanZaaa C Nov. 6, 2022, 4:06 p.m. OK GNU C++17 (64) TESTS 8 46 2662400
179617502 PLA_Nh C Nov. 6, 2022, 4:05 p.m. OK GNU C++17 (64) TESTS 8 46 3584000
179851270 luowanxin C Nov. 7, 2022, 3:58 a.m. OK GNU C++17 (64) TESTS 8 46 4812800
179627022 aditya_108 C Nov. 6, 2022, 4:41 p.m. OK GNU C++17 (64) TESTS 8 46 7987200
179618985 zadymiarz123 C Nov. 6, 2022, 4:11 p.m. OK GNU C++17 (64) TESTS 8 46 9011200
179616116 LeVanThuc C Nov. 6, 2022, 3:59 p.m. OK GNU C++17 (64) TESTS 8 46 10444800
179622377 Radyy C Nov. 6, 2022, 4:26 p.m. OK GNU C++20 (64) TESTS 8 30 1740800
179623797 Muhamed_Morsi C Nov. 6, 2022, 4:31 p.m. OK GNU C++20 (64) TESTS 8 30 2150400
179830962 N_z__ C Nov. 7, 2022, 12:19 a.m. OK GNU C++20 (64) TESTS 8 30 4710400
179617392 abotaha23 C Nov. 6, 2022, 4:04 p.m. OK GNU C++20 (64) TESTS 8 31 1433600
179617422 08150442 C Nov. 6, 2022, 4:04 p.m. OK GNU C++20 (64) TESTS 8 31 2560000
179627548 Saidul_1 C Nov. 6, 2022, 4:44 p.m. OK GNU C++20 (64) TESTS 8 31 2867200
179736080 T.H666 C Nov. 6, 2022, 5:53 p.m. OK GNU C++20 (64) TESTS 8 31 2867200
179652207 Serenity C Nov. 6, 2022, 5:02 p.m. OK GNU C++20 (64) TESTS 8 31 2867200
179832168 wdnmdddddd C Nov. 7, 2022, 12:52 a.m. OK GNU C++20 (64) TESTS 8 31 2867200
179830952 cs142857 C Nov. 7, 2022, 12:18 a.m. OK GNU C++20 (64) TESTS 8 31 2867200
179622332 mareshkau C Nov. 6, 2022, 4:26 p.m. OK Java 11 TESTS 8 248 921600
179755101 samitdas03 C Nov. 6, 2022, 6:05 p.m. OK Java 11 TESTS 8 249 0
179824318 cpp10 C Nov. 6, 2022, 9:18 p.m. OK Java 11 TESTS 8 249 0
179700848 __Serendipity C Nov. 6, 2022, 5:41 p.m. OK Java 11 TESTS 8 264 0
179869921 kartikpapney C Nov. 7, 2022, 4:19 a.m. OK Java 11 TESTS 8 265 1228800
179618398 doomhammer. C Nov. 6, 2022, 4:08 p.m. OK Java 11 TESTS 8 280 0
179616110 dinosparton_013 C Nov. 6, 2022, 3:59 p.m. OK Java 11 TESTS 8 280 0
179616271 kkkkush C Nov. 6, 2022, 4 p.m. OK Java 11 TESTS 8 295 0
179628502 dhruv_07 C Nov. 6, 2022, 4:49 p.m. OK Java 11 TESTS 8 296 0
179624458 yerkebayev C Nov. 6, 2022, 4:33 p.m. OK Java 11 TESTS 8 296 0
179620112 ghost24601 C Nov. 6, 2022, 4:16 p.m. OK Java 17 TESTS 8 265 819200
179658859 HarshChourasiya C Nov. 6, 2022, 5:04 p.m. OK Java 17 TESTS 8 280 409600
179844162 Ibrahim027 C Nov. 7, 2022, 3:36 a.m. OK Java 17 TESTS 8 295 3276800
179851253 kkz666 C Nov. 7, 2022, 3:58 a.m. OK Java 17 TESTS 8 311 4096000
179850924 xplorer C Nov. 7, 2022, 3:52 a.m. OK Java 17 TESTS 8 327 716800
179615102 Eslam_Ahmed C Nov. 6, 2022, 3:55 p.m. OK Java 17 TESTS 8 327 819200
179628454 hahahursh C Nov. 6, 2022, 4:48 p.m. OK Java 17 TESTS 8 451 16896000
179704867 TheILICH C Nov. 6, 2022, 5:42 p.m. OK Java 17 TESTS 8 997 3276800
179729210 Grizler C Nov. 6, 2022, 5:45 p.m. OK Java 17 TESTS 8 1060 3891200
179754448 ImperialHal C Nov. 6, 2022, 5:59 p.m. OK Java 17 TESTS 8 1309 204800
179616614 O_E C Nov. 6, 2022, 4:01 p.m. OK Java 8 TESTS 8 140 0
179742461 Zarby9834 C Nov. 6, 2022, 5:57 p.m. OK Java 8 TESTS 8 155 0
179615818 52-Clowns C Nov. 6, 2022, 3:58 p.m. OK Java 8 TESTS 8 155 0
179821389 Admin07 C Nov. 6, 2022, 8:28 p.m. OK Java 8 TESTS 8 155 2560000
179814101 ganesh_6 C Nov. 6, 2022, 6:48 p.m. OK Java 8 TESTS 8 155 4915200
179640881 1-1-1 C Nov. 6, 2022, 4:59 p.m. OK Java 8 TESTS 8 156 0
179624876 ganesh_6 C Nov. 6, 2022, 4:35 p.m. OK Java 8 TESTS 8 171 8806400
179626230 RonWonWon C Nov. 6, 2022, 4:40 p.m. OK Java 8 TESTS 8 186 2867200
179613901 sachinjaiswal C Nov. 6, 2022, 3:51 p.m. OK Java 8 TESTS 8 202 0
179613720 youtsuha2.0 C Nov. 6, 2022, 3:50 p.m. OK Java 8 TESTS 8 202 716800
179633399 bestgreenie C Nov. 6, 2022, 4:57 p.m. OK MS C++ 2017 TESTS 8 93 1024000
179615693 Tor_250 C Nov. 6, 2022, 3:57 p.m. OK MS C++ 2017 TESTS 8 139 2969600
179622169 HeirSeFa C Nov. 6, 2022, 4:25 p.m. OK MS C++ 2017 TESTS 8 264 819200
179617921 Vitru C Nov. 6, 2022, 4:06 p.m. OK MS C++ 2017 TESTS 8 1434 716800
179617360 KFrom40 C Nov. 6, 2022, 4:04 p.m. OK PHP TESTS 8 140 48332800
179618543 Greyhound C Nov. 6, 2022, 4:09 p.m. OK PyPy 3 TESTS 8 498 11468800
179633569 u1602016 C Nov. 6, 2022, 4:58 p.m. OK PyPy 3 TESTS 8 576 15667200
179616908 porplodrogon C Nov. 6, 2022, 4:02 p.m. OK PyPy 3 TESTS 8 577 10342400
179628146 watubub C Nov. 6, 2022, 4:47 p.m. OK PyPy 3 TESTS 8 592 11673600
179615348 dummy3 C Nov. 6, 2022, 3:56 p.m. OK PyPy 3 TESTS 8 654 25395200
179621221 akshitm16 C Nov. 6, 2022, 4:20 p.m. OK PyPy 3 TESTS 8 716 11161600
179627402 mohfasalih C Nov. 6, 2022, 4:43 p.m. OK PyPy 3 TESTS 8 717 16179200
179626287 auvred C Nov. 6, 2022, 4:40 p.m. OK PyPy 3 TESTS 8 826 17408000
179616599 Kalyano C Nov. 6, 2022, 4:01 p.m. OK PyPy 3-64 TESTS 8 234 13107200
179761816 devansh_7 C Nov. 6, 2022, 6:14 p.m. OK PyPy 3-64 TESTS 8 249 33075200
179620979 plevande C Nov. 6, 2022, 4:19 p.m. OK PyPy 3-64 TESTS 8 280 16896000
179768125 1_2_3_4_5_9 C Nov. 6, 2022, 6:19 p.m. OK PyPy 3-64 TESTS 8 295 39116800
179816134 zouyu9631 C Nov. 6, 2022, 7:12 p.m. OK PyPy 3-64 TESTS 8 311 18534400
179815951 AyuAnchor C Nov. 6, 2022, 7:10 p.m. OK PyPy 3-64 TESTS 8 358 12390400
179692732 Amay12 C Nov. 6, 2022, 5:39 p.m. OK PyPy 3-64 TESTS 8 358 17305600
179762035 yingkui C Nov. 6, 2022, 6:17 p.m. OK PyPy 3-64 TESTS 8 358 17612800
179616785 Aphrodite_wanna C Nov. 6, 2022, 4:02 p.m. OK PyPy 3-64 TESTS 8 358 34099200
179616449 The-Viking C Nov. 6, 2022, 4 p.m. OK PyPy 3-64 TESTS 8 373 23244800
179840657 xph_4n C Nov. 7, 2022, 2:32 a.m. OK Python 2 TESTS 8 732 9113600
179618252 Jirens_dad C Nov. 6, 2022, 4:08 p.m. OK Python 3 TESTS 8 654 11468800
179620864 sixthcore C Nov. 6, 2022, 4:19 p.m. OK Python 3 TESTS 8 1060 11980800
179788867 sagarpal1909 C Nov. 6, 2022, 6:30 p.m. OK Python 3 TESTS 8 1075 3481600
179621273 petras741 C Nov. 6, 2022, 4:21 p.m. OK Python 3 TESTS 8 1419 9318400
179729236 tahuruzzoha C Nov. 6, 2022, 5:46 p.m. OK Python 3 TESTS 8 1419 20889600
179633225 masoudglst C Nov. 6, 2022, 4:56 p.m. OK Python 3 TESTS 8 1512 5222400
179621290 abcsumit C Nov. 6, 2022, 4:21 p.m. OK Python 3 TESTS 8 1653 2457600
179624906 DosBall C Nov. 6, 2022, 4:35 p.m. OK Python 3 TESTS 8 1684 3379200
179839487 xph_4n C Nov. 7, 2022, 2:08 a.m. OK Python 3 TESTS 8 1684 5017600
179614898 meohenbk C Nov. 6, 2022, 3:54 p.m. OK Python 3 TESTS 8 1684 5017600
179632769 AhmadElRuby C Nov. 6, 2022, 4:55 p.m. OK Ruby 3 TESTS 8 857 29184000
179829321 JonathanBrouwer C Nov. 6, 2022, 11:21 p.m. OK Rust 2021 TESTS 8 155 7168000
179829440 JonathanBrouwer C Nov. 6, 2022, 11:24 p.m. OK Rust 2021 TESTS 8 218 7168000
179828438 JonathanBrouwer C Nov. 6, 2022, 10:54 p.m. OK Rust 2021 TESTS 8 218 7372800
179814995 JonathanBrouwer C Nov. 6, 2022, 6:58 p.m. OK Rust 2021 TESTS 8 920 11878400

remove filters

Back to search problems