Codeforces Round 540 (Div. 3)

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
1118 Codeforces Round 540 (Div. 3) FINISHED False 8100 186938723 Feb. 19, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5829 ) C Palindromic Matrix PROGRAMMING constructive algorithms implementation 1700

B'Let 's call some square matrix with integer values in its cells palindromic if it doesn 't change after the order of rows is reversed and it doesn 't change after the order of columns is reversed. For example, the following matrices are palindromic: The following matrices are not palindromic because they change after the order of rows is reversed: The following matrices are not palindromic because they change after the order of columns is reversed: You are given n^2 integers. Put them into a matrix of n rows and n columns so that each number is used exactly once, each cell contains exactly one number and the resulting matrix is palindromic. If there are multiple answers, print any. If there is no solution, print "NO". The first line contains one integer n ( 1 <= n <= 20 ). The second line contains n^2 integers a_1, a_2, ... , a_{n^2} ( 1 <= a_i <= 1000 ) -- the numbers to put into a matrix of n rows and n columns. If it is possible to put all of the n^2 numbers into a matrix of n rows and n columns so that each number is used exactly once, each cell contains exactly one number and the resulting matrix is palindromic, then print "YES". Then print n lines with n space-separated numbers -- the resulting matrix. If it 's impossible to construct any matrix, then print "NO". You can print each letter in any case (upper or lower). For example, "YeS", "no" and "yES" are all acceptable. Note that there exist multiple answers for the first two examples. '...

Tutorials

65396

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50769742 vjudge2 C March 4, 2019, 3:19 a.m. OK Clang++17 Diagnostics TESTS 63 46 0 1700
50818927 kmachina C March 5, 2019, 12:42 p.m. OK Clang++17 Diagnostics TESTS 63 46 7475200 1700
50266129 Yasola C Feb. 21, 2019, 4:26 a.m. OK Clang++17 Diagnostics TESTS 63 61 0 1700
50822010 kmachina C March 5, 2019, 1:55 p.m. OK Clang++17 Diagnostics TESTS 63 62 7475200 1700
50280063 ia7ck C Feb. 21, 2019, 12:17 p.m. OK D TESTS 63 31 4198400 1700
50279114 ia7ck C Feb. 21, 2019, 11:50 a.m. OK D TESTS 63 31 4198400 1700
54533968 Denor C May 23, 2019, 6:45 p.m. OK Delphi TESTS 63 31 102400 1700
54575072 Denor C May 24, 2019, 11:07 p.m. OK Delphi TESTS 63 46 0 1700
50195264 PAG C Feb. 19, 2019, 4:35 p.m. OK FPC TESTS 63 31 307200 1700
56492005 cs234_shrey C July 3, 2019, 11:03 p.m. OK GNU C11 TESTS 63 31 0 1700
50216427 HsiaoE C Feb. 20, 2019, 4:56 a.m. OK GNU C11 TESTS 63 31 0 1700
50270899 cprogrammer C Feb. 21, 2019, 7:12 a.m. OK GNU C11 TESTS 63 31 0 1700
50391561 vjudge4 C Feb. 23, 2019, 2:07 p.m. OK GNU C11 TESTS 63 31 0 1700
51127542 2018030401093 C March 10, 2019, 12:22 p.m. OK GNU C11 TESTS 63 31 0 1700
51127606 vjudge1 C March 10, 2019, 12:23 p.m. OK GNU C11 TESTS 63 31 0 1700
51134633 Nithish_Y C March 10, 2019, 3:26 p.m. OK GNU C11 TESTS 63 31 614400 1700
50240093 moki_sai C Feb. 20, 2019, 12:35 p.m. OK GNU C11 TESTS 63 31 3993600 1700
50207227 sai_shashank C Feb. 19, 2019, 7:59 p.m. OK GNU C11 TESTS 63 31 3993600 1700
55764139 ktk54x C June 19, 2019, 3:11 p.m. OK GNU C11 TESTS 63 31 3993600 1700
50237958 gentlelin C Feb. 20, 2019, 11:41 a.m. OK GNU C++11 TESTS 63 30 0 1700
50301031 darkflamehxy C Feb. 22, 2019, 2:15 a.m. OK GNU C++11 TESTS 63 30 0 1700
50673105 BBpigeon C March 2, 2019, 8:02 a.m. OK GNU C++11 TESTS 63 30 0 1700
50271623 cchengzi C Feb. 21, 2019, 7:37 a.m. OK GNU C++11 TESTS 63 30 3993600 1700
69454769 vjudge5 C Jan. 24, 2020, 8:04 a.m. OK GNU C++11 TESTS 63 31 0 1700
67957920 vjudge3 C Dec. 30, 2019, 10:23 a.m. OK GNU C++11 TESTS 63 31 0 1700
67058765 lzq41 C Dec. 17, 2019, 8:09 a.m. OK GNU C++11 TESTS 63 31 0 1700
64337609 mujpao C Nov. 5, 2019, 11:15 p.m. OK GNU C++11 TESTS 63 31 0 1700
69454911 Nyse C Jan. 24, 2020, 8:08 a.m. OK GNU C++11 TESTS 63 31 0 1700
69271461 _-Noob-_ C Jan. 21, 2020, 9:25 p.m. OK GNU C++11 TESTS 63 31 0 1700
50283530 I_hate_dp C Feb. 21, 2019, 1:48 p.m. OK GNU C++14 TESTS 63 15 0 1700
50313327 PKC C Feb. 22, 2019, 11 a.m. OK GNU C++14 TESTS 63 15 0 1700
67582580 nandonathaniel C Dec. 25, 2019, 6:50 a.m. OK GNU C++14 TESTS 63 15 0 1700
55122000 cr7legend C June 5, 2019, 11:10 a.m. OK GNU C++14 TESTS 63 15 204800 1700
50225101 HIR180 C Feb. 20, 2019, 7 a.m. OK GNU C++14 TESTS 63 15 204800 1700
50225133 coupy C Feb. 20, 2019, 7 a.m. OK GNU C++14 TESTS 63 15 204800 1700
50270663 BRCode C Feb. 21, 2019, 7:05 a.m. OK GNU C++14 TESTS 63 15 4198400 1700
55110778 H4XX C June 5, 2019, 6:07 a.m. OK GNU C++14 TESTS 63 30 0 1700
66682350 kalyan72 C Dec. 12, 2019, 1:34 p.m. OK GNU C++14 TESTS 63 30 0 1700
61098584 kaizen_ C Sept. 23, 2019, 5:20 a.m. OK GNU C++14 TESTS 63 30 0 1700
51911182 PyAlpha C March 27, 2019, 6:16 p.m. OK GNU C++17 TESTS 63 15 0 1700
55328686 LinusTorvaldsFan C June 9, 2019, 9:38 a.m. OK GNU C++17 TESTS 63 15 0 1700
55842811 divash C June 20, 2019, 7:04 p.m. OK GNU C++17 TESTS 63 15 0 1700
56049687 spectre009 C June 25, 2019, 6:22 p.m. OK GNU C++17 TESTS 63 15 0 1700
50561124 wangsili C Feb. 27, 2019, 11:07 a.m. OK GNU C++17 TESTS 63 15 0 1700
51775049 alshahreyaj C March 23, 2019, 8:56 p.m. OK GNU C++17 TESTS 63 15 0 1700
50669060 RAKAHARDA C March 2, 2019, 6:04 a.m. OK GNU C++17 TESTS 63 15 102400 1700
66897972 nbsjy C Dec. 15, 2019, 3:22 a.m. OK GNU C++17 TESTS 63 15 204800 1700
50267437 JusTice C Feb. 21, 2019, 5:20 a.m. OK GNU C++17 TESTS 63 15 614400 1700
67585315 amankrsingh C Dec. 25, 2019, 8:02 a.m. OK GNU C++17 TESTS 63 30 0 1700
50299892 cs_office C Feb. 22, 2019, 1:09 a.m. OK Go TESTS 63 46 0 1700
50213647 2008061626 C Feb. 20, 2019, 2:35 a.m. OK Go TESTS 63 46 0 1700
64791762 chojh1222 C Nov. 13, 2019, 11:28 a.m. OK Java 8 TESTS 63 109 0 1700
56175464 Sleeperino C June 27, 2019, 6:52 p.m. OK Java 8 TESTS 63 109 0 1700
52254839 dtsarun C April 3, 2019, 4:45 a.m. OK Java 8 TESTS 63 109 0 1700
51591613 MubtasimShahriar C March 20, 2019, 7 p.m. OK Java 8 TESTS 63 109 0 1700
51284009 FlightToDenmark C March 14, 2019, 6:09 a.m. OK Java 8 TESTS 63 109 0 1700
50922282 sn1pejkeee C March 7, 2019, 9:55 a.m. OK Java 8 TESTS 63 109 0 1700
50762573 Oopsimbad C March 3, 2019, 8:28 p.m. OK Java 8 TESTS 63 109 0 1700
50467590 Andres1 C Feb. 24, 2019, 8:52 p.m. OK Java 8 TESTS 63 109 0 1700
50342504 eficiency C Feb. 23, 2019, 3:42 a.m. OK Java 8 TESTS 63 109 0 1700
50311550 guptautkarsh028 C Feb. 22, 2019, 9:54 a.m. OK Java 8 TESTS 63 109 0 1700
50626871 exs C March 1, 2019, 6:37 a.m. OK Kotlin TESTS 63 139 0 1700
50312154 Killer45 C Feb. 22, 2019, 10:18 a.m. OK Kotlin TESTS 63 139 0 1700
50294308 glider.g C Feb. 21, 2019, 7:22 p.m. OK Kotlin TESTS 63 187 1228800 1700
51878653 Mosyagin C March 26, 2019, 9:23 p.m. OK Mono C# TESTS 63 62 0 1700
50261551 DoesNotExist C Feb. 21, 2019, 1:20 a.m. OK Mono C# TESTS 63 62 3993600 1700
59908473 Graf_Rav C Sept. 2, 2019, 4:18 p.m. OK Mono C# TESTS 63 77 102400 1700
50268853 NEvOl C Feb. 21, 2019, 6:08 a.m. OK Mono C# TESTS 63 77 3686400 1700
51941079 vjudge4 C March 28, 2019, 2:30 p.m. OK MS C++ TESTS 63 31 0 1700
51110432 Yanhui C March 10, 2019, 3:54 a.m. OK MS C++ TESTS 63 31 0 1700
51110128 vjudge5 C March 10, 2019, 3:38 a.m. OK MS C++ TESTS 63 31 0 1700
51109438 vjudge4 C March 10, 2019, 3:02 a.m. OK MS C++ TESTS 63 31 0 1700
50915848 vjudge5 C March 7, 2019, 6:17 a.m. OK MS C++ TESTS 63 31 0 1700
50915307 vjudge5 C March 7, 2019, 5:56 a.m. OK MS C++ TESTS 63 31 0 1700
52224213 wjfwjfwjf C April 2, 2019, 8:28 a.m. OK MS C++ TESTS 63 31 0 1700
52367793 vjudge2 C April 6, 2019, 3:36 a.m. OK MS C++ TESTS 63 31 0 1700
56866627 vjudge3 C July 12, 2019, 3:32 a.m. OK MS C++ TESTS 63 31 0 1700
57370914 DostavalovID C July 20, 2019, 10:53 a.m. OK MS C++ TESTS 63 31 0 1700
52321653 skychocowhite C April 4, 2019, 8:10 p.m. OK MS C++ 2017 TESTS 63 31 0 1700
50417488 OICoder_zsx C Feb. 24, 2019, 7:22 a.m. OK MS C++ 2017 TESTS 63 31 0 1700
50397775 lxga C Feb. 23, 2019, 4:44 p.m. OK MS C++ 2017 TESTS 63 31 0 1700
50314680 oceanlin C Feb. 22, 2019, 11:41 a.m. OK MS C++ 2017 TESTS 63 31 0 1700
50290569 prakashn C Feb. 21, 2019, 5:13 p.m. OK MS C++ 2017 TESTS 63 31 0 1700
50277535 Entropy___ C Feb. 21, 2019, 11 a.m. OK MS C++ 2017 TESTS 63 31 0 1700
61447559 MrLolthe1st C Sept. 28, 2019, 10:16 p.m. OK MS C++ 2017 TESTS 63 31 0 1700
55648585 2018qwer C June 16, 2019, 1:26 p.m. OK MS C++ 2017 TESTS 63 31 0 1700
53298134 FerThugGato125 C April 25, 2019, 6:39 p.m. OK MS C++ 2017 TESTS 63 31 0 1700
53182521 SmelJey C April 23, 2019, 8:25 a.m. OK MS C++ 2017 TESTS 63 31 0 1700
50692981 sbairammariabs C March 2, 2019, 4:34 p.m. OK PascalABC.NET TESTS 63 311 102400 1700
50694422 sbairammariabs C March 2, 2019, 5:20 p.m. OK PascalABC.NET TESTS 63 311 307200 1700
53187337 BLGALEX C April 23, 2019, 11:06 a.m. OK PascalABC.NET TESTS 63 312 204800 1700
53186337 BLGALEX C April 23, 2019, 10:34 a.m. OK PascalABC.NET TESTS 63 342 512000 1700
50639894 sbairammariabs C March 1, 2019, 1:29 p.m. OK PascalABC.NET TESTS 63 358 102400 1700
50914174 Orunbaev C March 7, 2019, 5:03 a.m. OK PascalABC.NET TESTS 63 374 307200 1700
50207777 rsFalse C Feb. 19, 2019, 8:19 p.m. OK Perl TESTS 63 46 0 1700
50400979 rsFalse C Feb. 23, 2019, 6:14 p.m. OK Perl TESTS 63 46 204800 1700
50241592 rsFalse C Feb. 20, 2019, 1:10 p.m. OK Perl TESTS 63 62 0 1700
50203814 rsFalse C Feb. 19, 2019, 6:17 p.m. OK Perl TESTS 63 62 204800 1700
50282018 mayakin C Feb. 21, 2019, 1:08 p.m. OK PHP TESTS 63 46 512000 1700
50203137 aeternalis1 C Feb. 19, 2019, 6:01 p.m. OK PyPy 2 TESTS 63 124 0 1700
57606401 bcollet C July 23, 2019, 6:07 p.m. OK PyPy 2 TESTS 63 124 204800 1700
50201483 wolffd C Feb. 19, 2019, 5:25 p.m. OK PyPy 2 TESTS 63 139 0 1700
50200079 fortmax120 C Feb. 19, 2019, 5:04 p.m. OK PyPy 2 TESTS 63 155 1433600 1700
50205172 IndianSnakeCharmer C Feb. 19, 2019, 6:54 p.m. OK PyPy 2 TESTS 63 155 1843200 1700
50205142 c1729 C Feb. 19, 2019, 6:53 p.m. OK PyPy 2 TESTS 63 155 1843200 1700
50197755 alessandrosolbiati C Feb. 19, 2019, 4:47 p.m. OK PyPy 2 TESTS 63 171 921600 1700
50205379 gatsko C Feb. 19, 2019, 7 p.m. OK PyPy 2 TESTS 63 186 1945600 1700
50236116 rookzeno C Feb. 20, 2019, 10:48 a.m. OK PyPy 3 TESTS 63 124 0 1700
50464981 yfo C Feb. 24, 2019, 7:22 p.m. OK PyPy 3 TESTS 63 139 0 1700
50240982 MaxHo C Feb. 20, 2019, 12:55 p.m. OK PyPy 3 TESTS 63 140 0 1700
50203853 lollihunter C Feb. 19, 2019, 6:18 p.m. OK PyPy 3 TESTS 63 140 0 1700
56634190 brosucks C July 6, 2019, 6:19 p.m. OK PyPy 3 TESTS 63 140 1331200 1700
51318477 Stephan C March 15, 2019, 3:35 a.m. OK PyPy 3 TESTS 63 155 0 1700
50233595 adshin21 C Feb. 20, 2019, 9:42 a.m. OK PyPy 3 TESTS 63 155 204800 1700
50198258 oliverwayne C Feb. 19, 2019, 4:48 p.m. OK PyPy 3 TESTS 63 156 0 1700
50242232 nikeshthapa255 C Feb. 20, 2019, 1:25 p.m. OK PyPy 3 TESTS 63 156 614400 1700
52560719 yumtam C April 10, 2019, 10:13 a.m. OK PyPy 3 TESTS 63 171 512000 1700
50216573 sampsonguo302 C Feb. 20, 2019, 5:02 a.m. OK Python 2 TESTS 63 171 102400 1700
51615039 allonsy_kim C March 21, 2019, 12:07 p.m. OK Python 2 TESTS 63 186 102400 1700
50483128 Inga.Trifan C Feb. 25, 2019, 10:08 a.m. OK Python 2 TESTS 63 187 307200 1700
50238935 ddatsko010101 C Feb. 20, 2019, 12:07 p.m. OK Python 3 TESTS 63 109 307200 1700
57112524 Vasiliy_48 C July 15, 2019, 6:10 p.m. OK Python 3 TESTS 63 109 307200 1700
53718281 jainaagam96 C May 3, 2019, 8:19 p.m. OK Python 3 TESTS 63 109 307200 1700
51487871 Tauzn C March 19, 2019, 2:20 p.m. OK Python 3 TESTS 63 109 307200 1700
50634336 Annvv C March 1, 2019, 11 a.m. OK Python 3 TESTS 63 109 307200 1700
50456489 Defelo C Feb. 24, 2019, 5:10 p.m. OK Python 3 TESTS 63 109 307200 1700
50262183 renjied C Feb. 21, 2019, 2:04 a.m. OK Python 3 TESTS 63 109 307200 1700
50254274 LHamster C Feb. 20, 2019, 6:46 p.m. OK Python 3 TESTS 63 109 307200 1700
50252675 Dart-Xeyter C Feb. 20, 2019, 6:04 p.m. OK Python 3 TESTS 63 109 307200 1700
50247361 EA5 C Feb. 20, 2019, 3:34 p.m. OK Python 3 TESTS 63 109 307200 1700
50224351 danchu C Feb. 20, 2019, 6:39 a.m. OK Ruby TESTS 63 62 102400 1700
50199999 arzk C Feb. 19, 2019, 5:03 p.m. OK Ruby TESTS 63 62 102400 1700
50291732 Veladus C Feb. 21, 2019, 5:50 p.m. OK Rust TESTS 63 31 0 1700
68149709 gearjack C Jan. 4, 2020, 6:22 a.m. OK Rust TESTS 63 31 0 1700
51538126 kantohm11 C March 19, 2019, 5:30 p.m. OK Rust TESTS 63 31 0 1700
50285193 arzk C Feb. 21, 2019, 2:31 p.m. OK Rust TESTS 63 31 0 1700
50286388 arzk C Feb. 21, 2019, 3:04 p.m. OK Rust TESTS 63 46 0 1700
50283043 yakamoto C Feb. 21, 2019, 1:36 p.m. OK Scala TESTS 63 530 307200 1700

remove filters

Back to search problems