Codeforces Round 767 (Div. 1)

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
1628 Codeforces Round 767 (Div. 1) FINISHED False 7200 94404263 Jan. 22, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3244 ) C Grid Xor PROGRAMMING constructive algorithms greedy implementation interactive math

B"Note: The XOR-sum of set {s_1,s_2, ldots,s_m } is defined as s_1 oplus s_2 oplus ldots oplus s_m , where oplus denotes the bitwise XOR operation. After almost winning IOI, Victor bought himself an n x n grid containing integers in each cell. n is an even integer. The integer in the cell in the i -th row and j -th column is a_{i,j} . Sadly, Mihai stole the grid from Victor and told him he would return it with only one condition: Victor has to tell Mihai the XOR-sum of all the integers in the whole grid. Victor doesn't remember all the elements of the grid, but he remembers some information about it: For each cell, Victor remembers the XOR-sum of all its neighboring cells. Two cells are considered neighbors if they share an edge -- in other words, for some integers 1 <= i, j, k, l <= n , the cell in the i -th row and j -th column is a neighbor of the cell in the k -th row and l -th column if |i - k| = 1 and j = l , or if i = k and |j - l| = 1 . To get his grid back, Victor is asking you for your help. Can you use the information Victor remembers to find the XOR-sum of the whole grid? It can be proven that the answer is unique. The first line of the input contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single even integer n ( 2 <= q n <= q 1000 ) -- the size of the grid. Then follows n lines, each containing n integers. The j -th integer in the i -th of these lines represents the XOR-sum of the integers in all the neighbors of the cell in the i -th row and j -th column. It is guaranteed that the sum of n over all test cases doesn't exceed 1000 and in the original grid 0 <= q a_{i, j} <= q 2^{30} - 1 . Hack Format To hack a solution, use the following format: The first line shou"...

Tutorials

99276

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
143680998 Gassa C Jan. 22, 2022, 3:52 p.m. OK D TESTS 16 234 13414400
143716544 rainboy C Jan. 22, 2022, 8:07 p.m. OK GNU C11 TESTS 16 171 1331200
143658804 zeliboba C Jan. 22, 2022, 3:09 p.m. OK GNU C++14 TESTS 16 171 12697600
143690661 F1aMiR3 C Jan. 22, 2022, 4:14 p.m. OK GNU C++14 TESTS 16 218 5120000
143687472 Johnson_sky C Jan. 22, 2022, 4:06 p.m. OK GNU C++14 TESTS 16 233 4096000
143695719 sys. C Jan. 22, 2022, 4:26 p.m. OK GNU C++14 TESTS 16 233 4096000
143699506 rui_er C Jan. 22, 2022, 4:34 p.m. OK GNU C++14 TESTS 16 233 8089600
143663406 Eric_hooo C Jan. 22, 2022, 3:17 p.m. OK GNU C++14 TESTS 16 233 8192000
143682183 cyh_toby C Jan. 22, 2022, 3:54 p.m. OK GNU C++14 TESTS 16 234 4096000
143694475 ABPower C Jan. 22, 2022, 4:23 p.m. OK GNU C++14 TESTS 16 234 4096000
143697392 HoshimiOWO C Jan. 22, 2022, 4:29 p.m. OK GNU C++14 TESTS 16 249 5017600
143697199 awoo C Jan. 22, 2022, 4:29 p.m. OK GNU C++14 TESTS 16 249 8192000
143670376 fallleaves01 C Jan. 22, 2022, 3:30 p.m. OK GNU C++17 TESTS 16 46 4505600
143671180 xyl1234 C Jan. 22, 2022, 3:32 p.m. OK GNU C++17 TESTS 16 46 7168000
143693521 flashsonic C Jan. 22, 2022, 4:21 p.m. OK GNU C++17 TESTS 16 171 4710400
143684346 OIer_kzc C Jan. 22, 2022, 3:59 p.m. OK GNU C++17 TESTS 16 171 9113600
143687114 kiriezhka228 C Jan. 22, 2022, 4:05 p.m. OK GNU C++17 TESTS 16 187 4505600
143657731 wjli C Jan. 22, 2022, 3:07 p.m. OK GNU C++17 TESTS 16 187 8704000
143681029 kristevalex C Jan. 22, 2022, 3:52 p.m. OK GNU C++17 TESTS 16 202 4300800
143680690 OMG_link C Jan. 22, 2022, 3:51 p.m. OK GNU C++17 TESTS 16 202 8089600
143688776 TeaPot C Jan. 22, 2022, 4:09 p.m. OK GNU C++17 TESTS 16 202 8499200
143692458 blue C Jan. 22, 2022, 4:18 p.m. OK GNU C++17 TESTS 16 217 7987200
143732706 Sakuyalove C Jan. 23, 2022, 4:17 a.m. OK GNU C++17 (64) TESTS 16 15 11264000
143672738 LayCurse C Jan. 22, 2022, 3:34 p.m. OK GNU C++17 (64) TESTS 16 30 10137600
143691135 QAQAutoMaton C Jan. 22, 2022, 4:15 p.m. OK GNU C++17 (64) TESTS 16 46 12697600
143734725 Nyaan C Jan. 23, 2022, 4:51 a.m. OK GNU C++17 (64) TESTS 16 46 13004800
143732800 Nyaan C Jan. 23, 2022, 4:19 a.m. OK GNU C++17 (64) TESTS 16 46 13312000
143715168 keyboard_virtuoso C Jan. 22, 2022, 7:41 p.m. OK GNU C++17 (64) TESTS 16 62 4505600
143671130 SpyCheese C Jan. 22, 2022, 3:31 p.m. OK GNU C++17 (64) TESTS 16 124 2048000
143680372 cuom1999 C Jan. 22, 2022, 3:50 p.m. OK GNU C++17 (64) TESTS 16 124 4096000
143708652 Komeiji_Green C Jan. 22, 2022, 6:11 p.m. OK GNU C++17 (64) TESTS 16 124 4096000
143669611 riantkb C Jan. 22, 2022, 3:28 p.m. OK GNU C++17 (64) TESTS 16 124 4505600
143730520 maspy C Jan. 23, 2022, 3:36 a.m. OK GNU C++20 (64) TESTS 16 31 8704000
143709850 maxplus C Jan. 22, 2022, 6:24 p.m. OK GNU C++20 (64) TESTS 16 46 0
143728733 maspy C Jan. 23, 2022, 2:56 a.m. OK GNU C++20 (64) TESTS 16 61 17305600
143711048 maxplus C Jan. 22, 2022, 6:38 p.m. OK GNU C++20 (64) TESTS 16 62 0
143728851 maspy C Jan. 23, 2022, 2:59 a.m. OK GNU C++20 (64) TESTS 16 62 17305600
143727417 maspy C Jan. 23, 2022, 2:20 a.m. OK GNU C++20 (64) TESTS 16 77 17305600
143729343 maspy C Jan. 23, 2022, 3:09 a.m. OK GNU C++20 (64) TESTS 16 92 8704000
143709491 maxplus C Jan. 22, 2022, 6:20 p.m. OK GNU C++20 (64) TESTS 16 109 0
143691238 Hile_Meow C Jan. 22, 2022, 4:15 p.m. OK GNU C++20 (64) TESTS 16 109 4096000
143686211 Ormlis C Jan. 22, 2022, 4:03 p.m. OK GNU C++20 (64) TESTS 16 109 4505600
143702339 clyring C Jan. 22, 2022, 5:25 p.m. OK Haskell TESTS 16 343 32563200
143717459 derrick20 C Jan. 22, 2022, 8:27 p.m. OK Java 11 TESTS 16 280 0
143682672 knightL C Jan. 22, 2022, 3:55 p.m. OK Java 11 TESTS 16 389 6656000
143723703 Restricted C Jan. 22, 2022, 11:54 p.m. OK Java 11 TESTS 16 405 4915200
143716411 fetetriste C Jan. 22, 2022, 8:04 p.m. OK Java 8 TESTS 16 280 0
143689379 iakovlev.zakhar C Jan. 22, 2022, 4:10 p.m. OK Java 8 TESTS 16 295 0
143672746 SecondThread C Jan. 22, 2022, 3:35 p.m. OK Java 8 TESTS 16 373 38297600
143668972 arvindf232 C Jan. 22, 2022, 3:27 p.m. OK Kotlin 1.4 TESTS 16 217 0
143684511 Hakiobo C Jan. 22, 2022, 3:59 p.m. OK Kotlin 1.4 TESTS 16 405 0
143670394 machine_solution C Jan. 22, 2022, 3:30 p.m. OK MS C++ 2017 TESTS 16 950 102400
143688761 Andybar C Jan. 22, 2022, 4:09 p.m. OK .NET Core C# TESTS 16 171 10547200
143686938 mban259 C Jan. 22, 2022, 4:05 p.m. OK .NET Core C# TESTS 16 171 11366400
143681358 bcollet C Jan. 22, 2022, 3:52 p.m. OK PyPy 2 TESTS 16 982 30924800
143704759 codicon C Jan. 22, 2022, 5:37 p.m. OK PyPy 3 TESTS 16 265 14028800
143733765 SangBijaksana C Jan. 23, 2022, 4:37 a.m. OK PyPy 3 TESTS 16 998 17203200
143663432 whatshisbucket C Jan. 22, 2022, 3:17 p.m. OK PyPy 3 TESTS 16 1029 10854400
143672041 titia C Jan. 22, 2022, 3:33 p.m. OK PyPy 3 TESTS 16 1044 14950400
143696794 akhan42 C Jan. 22, 2022, 4:28 p.m. OK PyPy 3 TESTS 16 1075 11571200
143723374 oadey89 C Jan. 22, 2022, 11:36 p.m. OK PyPy 3-64 TESTS 16 405 54272000
143715022 coder_sounak C Jan. 22, 2022, 7:38 p.m. OK PyPy 3-64 TESTS 16 607 51712000
143664968 manish.17 C Jan. 22, 2022, 3:20 p.m. OK PyPy 3-64 TESTS 16 623 110592000
143725997 shotoyoo C Jan. 23, 2022, 1:36 a.m. OK PyPy 3-64 TESTS 16 935 25702400
143717353 MrVroom999 C Jan. 22, 2022, 8:25 p.m. OK PyPy 3-64 TESTS 16 936 24166400
143697724 chinerist C Jan. 22, 2022, 4:30 p.m. OK PyPy 3-64 TESTS 16 1263 36044800
143683191 Jimanbanashi C Jan. 22, 2022, 3:56 p.m. OK Python 2 TESTS 16 358 17100800
143715248 OLOGY C Jan. 22, 2022, 7:42 p.m. OK Python 2 TESTS 16 577 27136000
143717842 OLOGY C Jan. 22, 2022, 8:34 p.m. OK Python 2 TESTS 16 904 27238400
143710220 OLOGY C Jan. 22, 2022, 6:27 p.m. OK Python 2 TESTS 16 966 27136000
143691178 SanguineChameleon C Jan. 22, 2022, 4:15 p.m. OK Python 3 TESTS 16 654 26828800
143677065 r57shell C Jan. 22, 2022, 3:43 p.m. OK Python 3 TESTS 16 997 26521600
143694758 Egor C Jan. 22, 2022, 4:24 p.m. OK Rust 2021 TESTS 16 46 5017600
143666722 kobae964 C Jan. 22, 2022, 3:23 p.m. OK Rust 2021 TESTS 16 139 4710400
143705901 kobae964 C Jan. 22, 2022, 5:45 p.m. OK Rust 2021 TESTS 16 155 4403200
143668694 sansen C Jan. 22, 2022, 3:27 p.m. OK Rust 2021 TESTS 16 155 26316800
143712741 qwerty787788 C Jan. 22, 2022, 7:02 p.m. OK Rust 2021 TESTS 16 171 4403200
143712640 qwerty787788 C Jan. 22, 2022, 7:01 p.m. OK Rust 2021 TESTS 16 202 4403200

remove filters

Back to search problems