Codeforces Round 564 (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
1173 Codeforces Round 564 (Div. 2) FINISHED False 7200 177530087 June 7, 2019, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9145 ) B Nauuo and Chess PROGRAMMING constructive algorithms greedy 1100

B"Nauuo is a girl who loves playing chess. One day she invented a game by herself which needs n chess pieces to play on a m x m chessboard. The rows and columns are numbered from 1 to m . We denote a cell on the intersection of the r -th row and c -th column as (r,c) . The game's goal is to place n chess pieces numbered from 1 to n on the chessboard, the i -th piece lies on (r_i, ,c_i) , while the following rule is satisfied: for all pairs of pieces i and j , |r_i-r_j|+|c_i-c_j| ge|i-j| . Here |x| means the absolute value of x . However, Nauuo discovered that sometimes she couldn't find a solution because the chessboard was too small. She wants to find the smallest chessboard on which she can put n pieces according to the rules. She also wonders how to place the pieces on such a chessboard. Can you help her? The only line contains a single integer n ( 1 <= n <= 1000 ) -- the number of chess pieces for the game. The first line contains a single integer -- the minimum value of m , where m is the length of sides of the suitable chessboard. The i -th of the next n lines contains two integers r_i and c_i ( 1 <= r_i,c_i <= m ) -- the coordinates of the i -th chess piece. If there are multiple answers, print any. In the first example, you can't place the two pieces on a 1 x 1 chessboard without breaking the rule. But you can place two pieces on a 2 x 2 chessboard like this: In the second example, you can't place four pieces on a 2 x 2 chessboard without breaking the rule. For example, if you place the pieces like this: then |r_1-r_3|+|c_1-c_3|=|1-2|+|1-1|=1 , |1-3|=2 , 1<2 ; and |r_1-r_4|+|c_1-c_4|=|1-2|+|1-2|=2 , |1-4|=3 , 2<3 . It doesn't satisfy the rule. However, on a 3 x 3 chessboard, you can place four pieces like this: "...

Tutorials

Codeforces Round #564 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
57977973 TianSunXing B July 30, 2019, 8:21 a.m. OK Clang++17 Diagnostics TESTS 65 46 0 1100
55250391 daut-dlang B June 7, 2019, 12:24 p.m. OK D TESTS 65 31 0 1100
55251836 ia7ck B June 7, 2019, 12:29 p.m. OK D TESTS 65 31 0 1100
55287896 xcodevn B June 8, 2019, 6:07 a.m. OK D TESTS 65 31 0 1100
55254205 xcodevn B June 7, 2019, 12:39 p.m. OK D TESTS 65 46 0 1100
55249472 ruban B June 7, 2019, 12:21 p.m. OK Delphi TESTS 65 31 33689600 1100
55250791 Denor B June 7, 2019, 12:25 p.m. OK Delphi TESTS 65 46 0 1100
55254357 Lokn B June 7, 2019, 12:40 p.m. OK FPC TESTS 65 31 0 1100
60778034 pascal_handle B Sept. 18, 2019, 3:10 p.m. OK FPC TESTS 65 31 0 1100
55265195 ninjadoc0153 B June 7, 2019, 1:55 p.m. OK FPC TESTS 65 31 307200 1100
55256812 Craspedacusta B June 7, 2019, 12:54 p.m. OK FPC TESTS 65 31 307200 1100
55253235 somerandomsymbols B June 7, 2019, 12:35 p.m. OK FPC TESTS 65 31 307200 1100
55249548 dblark B June 7, 2019, 12:21 p.m. OK FPC TESTS 65 31 307200 1100
55254739 nazyalvr B June 7, 2019, 12:42 p.m. OK FPC TESTS 65 46 0 1100
55259260 omlgg B June 7, 2019, 1:11 p.m. OK FPC TESTS 65 46 102400 1100
55254236 LaSWeeG B June 7, 2019, 12:39 p.m. OK FPC TESTS 65 46 307200 1100
58956388 You_Know_Who B Aug. 17, 2019, 1:12 p.m. OK GNU C11 TESTS 65 31 0 1100
58958285 NoSoul B Aug. 17, 2019, 2:01 p.m. OK GNU C11 TESTS 65 31 0 1100
61047340 nikhilreddy123 B Sept. 22, 2019, 5:07 a.m. OK GNU C11 TESTS 65 31 0 1100
63062070 rackeh B Oct. 21, 2019, 9:06 a.m. OK GNU C11 TESTS 65 31 0 1100
69557977 mth1908 B Jan. 26, 2020, 9:34 a.m. OK GNU C11 TESTS 65 31 0 1100
55337035 Lukman03 B June 9, 2019, 2:28 p.m. OK GNU C11 TESTS 65 31 0 1100
55386062 meat-eatinggoat B June 10, 2019, 7:12 a.m. OK GNU C11 TESTS 65 31 0 1100
55386102 meat-eatinggoat B June 10, 2019, 7:14 a.m. OK GNU C11 TESTS 65 31 0 1100
55393861 hemantcs014 B June 10, 2019, 10:57 a.m. OK GNU C11 TESTS 65 31 0 1100
56070774 luciferkingofthehell B June 26, 2019, 10:19 a.m. OK GNU C11 TESTS 65 31 0 1100
55293351 AdiZer0 B June 8, 2019, 8:45 a.m. OK GNU C++11 TESTS 65 30 0 1100
69395694 Goobyee B Jan. 23, 2020, 6:11 a.m. OK GNU C++11 TESTS 65 31 0 1100
69513389 nkdanta1 B Jan. 25, 2020, 11:12 a.m. OK GNU C++11 TESTS 65 31 0 1100
69936626 DevC B Feb. 1, 2020, 4:11 a.m. OK GNU C++11 TESTS 65 31 0 1100
68829282 _Kema_ B Jan. 14, 2020, 8:53 p.m. OK GNU C++11 TESTS 65 31 0 1100
68642691 hsrf7 B Jan. 12, 2020, 8:02 a.m. OK GNU C++11 TESTS 65 31 0 1100
68323080 vjudge3 B Jan. 6, 2020, 3:44 p.m. OK GNU C++11 TESTS 65 31 0 1100
68143884 atharvag B Jan. 4, 2020, 2:26 a.m. OK GNU C++11 TESTS 65 31 0 1100
69197287 LeThanhLong582000 B Jan. 20, 2020, 3:20 p.m. OK GNU C++11 TESTS 65 31 0 1100
68075390 Hittu B Jan. 2, 2020, 12:17 p.m. OK GNU C++11 TESTS 65 31 0 1100
55289299 bool_everything_zero B June 8, 2019, 6:51 a.m. OK GNU C++14 TESTS 65 15 0 1100
55739206 Bencq B June 19, 2019, 6:29 a.m. OK GNU C++14 TESTS 65 15 0 1100
55595252 nick7991 B June 15, 2019, 2:39 p.m. OK GNU C++14 TESTS 65 15 0 1100
55392512 xyq0220 B June 10, 2019, 10:23 a.m. OK GNU C++14 TESTS 65 15 0 1100
55248428 jauhar.wibisono B June 7, 2019, 12:17 p.m. OK GNU C++14 TESTS 65 15 0 1100
55311670 IsmailToukhy B June 8, 2019, 6:03 p.m. OK GNU C++14 TESTS 65 15 6451200 1100
63663276 jupiro B Oct. 28, 2019, 2:29 p.m. OK GNU C++14 TESTS 65 30 0 1100
64630519 BlueDiamond B Nov. 10, 2019, 10 a.m. OK GNU C++14 TESTS 65 30 0 1100
66072601 Anus1373 B Nov. 30, 2019, 8:26 p.m. OK GNU C++14 TESTS 65 30 0 1100
62217860 Mahmoud.Amin99 B Oct. 9, 2019, 4:32 p.m. OK GNU C++14 TESTS 65 30 0 1100
58518958 for_all B Aug. 10, 2019, 2:53 a.m. OK GNU C++17 TESTS 65 15 0 1100
55269398 aspatelakbar B June 7, 2019, 3:47 p.m. OK GNU C++17 TESTS 65 15 0 1100
55273085 practice B June 7, 2019, 5:26 p.m. OK GNU C++17 TESTS 65 15 0 1100
55292268 misclicked B June 8, 2019, 8:15 a.m. OK GNU C++17 TESTS 65 15 0 1100
55379786 ACACACACACACWACACACACAC B June 9, 2019, 7:39 p.m. OK GNU C++17 TESTS 65 15 0 1100
69727394 Heisenberg_65 B Jan. 29, 2020, 12:39 p.m. OK GNU C++17 TESTS 65 30 0 1100
60778406 dziku B Sept. 18, 2019, 3:18 p.m. OK GNU C++17 TESTS 65 30 0 1100
60703051 Tocaloid B Sept. 17, 2019, 2:38 a.m. OK GNU C++17 TESTS 65 30 0 1100
60268512 KenjiH B Sept. 8, 2019, 2:25 p.m. OK GNU C++17 TESTS 65 30 0 1100
58626056 vjudge1 B Aug. 11, 2019, 5:30 p.m. OK GNU C++17 TESTS 65 30 0 1100
55262141 kkohtaka B June 7, 2019, 1:32 p.m. OK Go TESTS 65 46 0 1100
55253579 cojna B June 7, 2019, 12:36 p.m. OK Haskell TESTS 65 46 102400 1100
69181792 Baba-Yaga-0 B Jan. 20, 2020, 10:27 a.m. OK Java 11 TESTS 65 233 0 1100
59105654 Jarik B Aug. 19, 2019, 5:54 p.m. OK Java 8 TESTS 65 109 0 1100
56501461 eng_hardik B July 4, 2019, 6:32 a.m. OK Java 8 TESTS 65 109 0 1100
55504729 azhar556 B June 12, 2019, 5:10 p.m. OK Java 8 TESTS 65 109 0 1100
55468130 MubtasimShahriar B June 11, 2019, 5:21 p.m. OK Java 8 TESTS 65 109 0 1100
55314873 TheSawan B June 8, 2019, 8:38 p.m. OK Java 8 TESTS 65 109 0 1100
55303012 maheshwari29 B June 8, 2019, 12:50 p.m. OK Java 8 TESTS 65 109 0 1100
55289489 Ad-007 B June 8, 2019, 6:57 a.m. OK Java 8 TESTS 65 109 0 1100
55286621 Pratik_Rajani B June 8, 2019, 5:21 a.m. OK Java 8 TESTS 65 109 0 1100
55285812 optimaniax B June 8, 2019, 4:48 a.m. OK Java 8 TESTS 65 109 0 1100
55285774 amolpratap007 B June 8, 2019, 4:46 a.m. OK Java 8 TESTS 65 109 0 1100
55252334 orazbek B June 7, 2019, 12:31 p.m. OK JavaScript TESTS 65 46 1228800 1100
56610770 I.A.K.O.V B July 6, 2019, 7:11 a.m. OK Kotlin TESTS 65 124 0 1100
55520013 max_kibble B June 13, 2019, 7:57 a.m. OK Kotlin TESTS 65 140 0 1100
55327129 xxx_alisher_xxx B June 9, 2019, 8:46 a.m. OK Kotlin TESTS 65 140 0 1100
55276352 demon.machine B June 7, 2019, 7:24 p.m. OK Kotlin TESTS 65 140 0 1100
55252533 Protagoras B June 7, 2019, 12:32 p.m. OK Kotlin TESTS 65 156 0 1100
56182395 Spheniscine B June 28, 2019, 1:25 a.m. OK Kotlin TESTS 65 171 102400 1100
55402510 ali_alavi B June 10, 2019, 2:45 p.m. OK Mono C# TESTS 65 46 0 1100
55293683 m1_k3 B June 8, 2019, 8:54 a.m. OK Mono C# TESTS 65 46 102400 1100
55570079 og.kostya B June 14, 2019, 6:05 p.m. OK Mono C# TESTS 65 61 0 1100
56072669 TRR B June 26, 2019, 11:16 a.m. OK Mono C# TESTS 65 61 102400 1100
58235511 MWagihM B Aug. 3, 2019, 7:16 p.m. OK Mono C# TESTS 65 61 3072000 1100
55314425 SegaMegaDrive B June 8, 2019, 8:05 p.m. OK Mono C# TESTS 65 62 102400 1100
55249080 eki B June 7, 2019, 12:19 p.m. OK Mono C# TESTS 65 62 102400 1100
56425875 treasuryonly B July 2, 2019, 9:35 a.m. OK Mono C# TESTS 65 62 102400 1100
55250906 hibatibati B June 7, 2019, 12:25 p.m. OK Mono C# TESTS 65 62 102400 1100
55251220 omikad B June 7, 2019, 12:27 p.m. OK Mono C# TESTS 65 62 102400 1100
61265939 vjudge1 B Sept. 25, 2019, 12:45 p.m. OK MS C++ TESTS 65 31 0 1100
58524995 vjudge4 B Aug. 10, 2019, 6:43 a.m. OK MS C++ TESTS 65 31 0 1100
57974232 TianJianXing B July 30, 2019, 7:07 a.m. OK MS C++ TESTS 65 31 0 1100
57971465 TianSunXing B July 30, 2019, 6:07 a.m. OK MS C++ TESTS 65 31 0 1100
57948076 vjudge1 B July 29, 2019, 3:10 p.m. OK MS C++ TESTS 65 31 0 1100
57794811 vjudge4 B July 26, 2019, 11 a.m. OK MS C++ TESTS 65 31 0 1100
56622230 vjudge3 B July 6, 2019, 12:20 p.m. OK MS C++ TESTS 65 31 0 1100
56299257 solve_hzy B June 30, 2019, 7:55 a.m. OK MS C++ TESTS 65 31 0 1100
65528743 vjudge1 B Nov. 22, 2019, 11:32 a.m. OK MS C++ TESTS 65 31 0 1100
65568980 vjudge1 B Nov. 23, 2019, 7:08 a.m. OK MS C++ TESTS 65 31 0 1100
57970474 TianPingXing B July 30, 2019, 5:41 a.m. OK MS C++ 2017 TESTS 65 31 0 1100
57970264 TianSunXing B July 30, 2019, 5:36 a.m. OK MS C++ 2017 TESTS 65 31 0 1100
57971013 TianJianXing B July 30, 2019, 5:55 a.m. OK MS C++ 2017 TESTS 65 31 0 1100
57972001 TianPingXing B July 30, 2019, 6:20 a.m. OK MS C++ 2017 TESTS 65 31 0 1100
57972035 TianZuiXing B July 30, 2019, 6:21 a.m. OK MS C++ 2017 TESTS 65 31 0 1100
57982214 TianJianXing B July 30, 2019, 9:50 a.m. OK MS C++ 2017 TESTS 65 31 0 1100
57990435 TianJianXing B July 30, 2019, 1:01 p.m. OK MS C++ 2017 TESTS 65 31 0 1100
58053421 TianJianXing B July 31, 2019, 3:43 a.m. OK MS C++ 2017 TESTS 65 31 0 1100
58924469 V4V B Aug. 16, 2019, 6:44 p.m. OK MS C++ 2017 TESTS 65 31 0 1100
62592744 shio B Oct. 14, 2019, 10:26 p.m. OK MS C++ 2017 TESTS 65 31 0 1100
55255062 MI73 B June 7, 2019, 12:44 p.m. OK PascalABC.NET TESTS 65 374 102400 1100
56475365 lostamok B July 3, 2019, 12:54 p.m. OK PHP TESTS 65 31 409600 1100
57161487 mayakin B July 16, 2019, 7:19 p.m. OK PHP TESTS 65 46 409600 1100
57969463 TianPingXing B July 30, 2019, 5:06 a.m. OK PHP TESTS 65 46 409600 1100
57969423 TianJianXing B July 30, 2019, 5:04 a.m. OK PHP TESTS 65 62 512000 1100
55250938 drd93 B June 7, 2019, 12:25 p.m. OK PyPy 2 TESTS 65 140 0 1100
58553773 frostD B Aug. 10, 2019, 11:01 p.m. OK PyPy 2 TESTS 65 140 0 1100
55251085 Mukundan314 B June 7, 2019, 12:26 p.m. OK PyPy 2 TESTS 65 140 204800 1100
58714323 -Morass- B Aug. 13, 2019, 1:28 p.m. OK PyPy 2 TESTS 65 140 307200 1100
55268611 raj1307 B June 7, 2019, 3:32 p.m. OK PyPy 2 TESTS 65 140 409600 1100
55251452 c1729 B June 7, 2019, 12:27 p.m. OK PyPy 2 TESTS 65 155 102400 1100
59668290 yumtam B Aug. 29, 2019, 2:59 p.m. OK PyPy 2 TESTS 65 155 921600 1100
55258840 torabey B June 7, 2019, 1:08 p.m. OK PyPy 2 TESTS 65 156 0 1100
55254880 juchan1220 B June 7, 2019, 12:42 p.m. OK PyPy 2 TESTS 65 156 409600 1100
55252969 anshuman16423 B June 7, 2019, 12:33 p.m. OK PyPy 2 TESTS 65 171 512000 1100
55310042 Bovniova B June 8, 2019, 5 p.m. OK PyPy 3 TESTS 65 140 0 1100
55271115 ZzaZi B June 7, 2019, 4:26 p.m. OK PyPy 3 TESTS 65 140 0 1100
55697729 scambret B June 18, 2019, 12:48 a.m. OK PyPy 3 TESTS 65 140 204800 1100
55271181 victarry B June 7, 2019, 4:28 p.m. OK PyPy 3 TESTS 65 140 204800 1100
55493681 vyassamir B June 12, 2019, 11:25 a.m. OK PyPy 3 TESTS 65 140 1024000 1100
55255223 fatnot B June 7, 2019, 12:44 p.m. OK PyPy 3 TESTS 65 155 102400 1100
55253268 MCArth B June 7, 2019, 12:35 p.m. OK PyPy 3 TESTS 65 155 204800 1100
55251265 CHelle B June 7, 2019, 12:27 p.m. OK PyPy 3 TESTS 65 155 204800 1100
55251605 Paixao B June 7, 2019, 12:28 p.m. OK PyPy 3 TESTS 65 155 819200 1100
55257218 zeus111 B June 7, 2019, 12:57 p.m. OK PyPy 3 TESTS 65 155 921600 1100
55949054 PrzemekKapica B June 22, 2019, 10:56 p.m. OK Python 2 TESTS 65 171 0 1100
55382014 NIeves B June 9, 2019, 9:40 p.m. OK Python 2 TESTS 65 171 0 1100
55309389 Stefania B June 8, 2019, 4:35 p.m. OK Python 2 TESTS 65 171 0 1100
56996247 naylord B July 13, 2019, 10:37 p.m. OK Python 2 TESTS 65 186 0 1100
55489115 franckmy B June 12, 2019, 9:18 a.m. OK Python 2 TESTS 65 186 0 1100
55432240 29029 B June 11, 2019, 12:01 p.m. OK Python 2 TESTS 65 186 102400 1100
56235830 blackscholar B June 28, 2019, 4:11 p.m. OK Python 2 TESTS 65 187 0 1100
55259048 daniel.carlos B June 7, 2019, 1:09 p.m. OK Python 2 TESTS 65 187 0 1100
55253995 kaif_7 B June 7, 2019, 12:38 p.m. OK Python 2 TESTS 65 187 0 1100
55250804 shubhankarsharma00 B June 7, 2019, 12:25 p.m. OK Python 2 TESTS 65 187 0 1100
55525267 vjudge3 B June 13, 2019, 10:51 a.m. OK Python 3 TESTS 65 109 102400 1100
55310833 thesid01 B June 8, 2019, 5:28 p.m. OK Python 3 TESTS 65 109 102400 1100
55296409 Limeni B June 8, 2019, 10:04 a.m. OK Python 3 TESTS 65 109 102400 1100
55291660 insung151 B June 8, 2019, 7:59 a.m. OK Python 3 TESTS 65 109 102400 1100
55273793 shamim7999 B June 7, 2019, 5:47 p.m. OK Python 3 TESTS 65 109 102400 1100
55272904 sina.nasiri66 B June 7, 2019, 5:21 p.m. OK Python 3 TESTS 65 109 102400 1100
68476130 Mehrdad_ravenS B Jan. 10, 2020, 5:38 a.m. OK Python 3 TESTS 65 109 307200 1100
55257999 Bin4ryGh0st B June 7, 2019, 1:02 p.m. OK Python 3 TESTS 65 109 307200 1100
63934405 zapdospops B Oct. 31, 2019, 3:22 p.m. OK Python 3 TESTS 65 109 409600 1100
62639155 nikeshthapa255 B Oct. 15, 2019, 5:39 p.m. OK Python 3 TESTS 65 109 409600 1100
55250765 mai B June 7, 2019, 12:25 p.m. OK Ruby TESTS 65 77 0 1100
55250265 rinzu B June 7, 2019, 12:23 p.m. OK Ruby TESTS 65 77 0 1100
55248377 koikotya B June 7, 2019, 12:17 p.m. OK Ruby TESTS 65 77 0 1100
55860521 LowR B June 21, 2019, 9:19 a.m. OK Rust TESTS 65 46 0 1100
55248923 yoshrc B June 7, 2019, 12:19 p.m. OK Rust TESTS 65 61 0 1100
55261657 yakamoto B June 7, 2019, 1:28 p.m. OK Scala TESTS 65 389 0 1100

remove filters

Back to search problems