Codeforces Round 664 (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
1395 Codeforces Round 664 (Div. 2) FINISHED False 7200 134580299 Aug. 12, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16073 ) B Boboniu Plays Chess PROGRAMMING constructive algorithms 1100

B"Boboniu likes playing chess with his employees. As we know, no employee can beat the boss in the chess game, so Boboniu has never lost in any round. You are a new applicant for his company. Boboniu will test you with the following chess question: Consider a n x m grid (rows are numbered from 1 to n , and columns are numbered from 1 to m ). You have a chess piece, and it stands at some cell (S_x,S_y) which is not on the border (i.e. 2 <= S_x <= n-1 and 2 <= S_y <= m-1 ). From the cell (x,y) , you can move your chess piece to (x,y') ( 1 <= y' <= m, y' neq y ) or (x',y) ( 1 <= x' <= n, x' neq x ). In other words, the chess piece moves as a rook. From the cell, you can move to any cell on the same row or column. Your goal is to visit each cell exactly once. Can you find a solution? Note that cells on the path between two adjacent cells in your route are not counted as visited, and it is not required to return to the starting point. The only line of the input contains four integers n , m , S_x and S_y ( 3 <= n,m <= 100 , 2 <= S_x <= n-1 , 2 <= S_y <= m-1 ) -- the number of rows, the number of columns, and the initial position of your chess piece, respectively. You should print n cdot m lines. The i -th line should contain two integers x_i and y_i ( 1 <= q x_i <= q n , 1 <= q y_i <= q m ), denoting the i -th cell that you visited. You should print exactly nm pairs (x_i, y_i) , they should cover all possible pairs (x_i, y_i) , such that 1 <= q x_i <= q n , 1 <= q y_i <= q m . We can show that under these constraints there always exists a solution. If there are multiple answers, print any. Possible routes for two examples: "...

Tutorials

Codeforces Round #664 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
89873664 Venu_Bondugula B Aug. 14, 2020, 1:20 p.m. OK Clang++17 Diagnostics TESTS 70 46 0 1100
89868061 wlshih B Aug. 14, 2020, 11:58 a.m. OK Clang++17 Diagnostics TESTS 70 139 0 1100
90502005 Vicfred B Aug. 21, 2020, 1:42 a.m. OK D TESTS 70 46 3686400 1100
90352120 _shiv_ B Aug. 19, 2020, 2:19 a.m. OK GNU C11 TESTS 70 62 0 1100
90009507 ShofiqurRahman B Aug. 15, 2020, 10:18 a.m. OK GNU C11 TESTS 70 62 0 1100
90407976 Median B Aug. 19, 2020, 4:51 p.m. OK GNU C11 TESTS 70 62 0 1100
91017289 KCSB B Aug. 26, 2020, 4:51 a.m. OK GNU C11 TESTS 70 62 0 1100
91587388 aNoobAgain B Sept. 1, 2020, 5:08 p.m. OK GNU C11 TESTS 70 62 0 1100
90216653 kabir2018331125 B Aug. 17, 2020, 10:09 a.m. OK GNU C11 TESTS 70 62 307200 1100
89833293 shakline_hossen B Aug. 14, 2020, 1:14 a.m. OK GNU C11 TESTS 70 62 307200 1100
90812763 satvik76 B Aug. 24, 2020, 9:32 a.m. OK GNU C11 TESTS 70 62 3993600 1100
90629697 ffb59 B Aug. 21, 2020, 6:38 p.m. OK GNU C11 TESTS 70 62 3993600 1100
90519115 Rahin31 B Aug. 21, 2020, 9:25 a.m. OK GNU C11 TESTS 70 62 3993600 1100
91225745 nikhil.tanna.33 B Aug. 28, 2020, 4:03 p.m. OK GNU C++11 TESTS 70 31 0 1100
91639417 lz.askey B Sept. 2, 2020, 12:19 p.m. OK GNU C++11 TESTS 70 31 0 1100
91606090 cylee B Sept. 2, 2020, 2:15 a.m. OK GNU C++11 TESTS 70 31 0 1100
91605422 Youth518 B Sept. 2, 2020, 1:45 a.m. OK GNU C++11 TESTS 70 31 0 1100
91570329 shweta_pardeshi B Sept. 1, 2020, 1:42 p.m. OK GNU C++11 TESTS 70 31 0 1100
91202233 zekun B Aug. 28, 2020, 11:14 a.m. OK GNU C++11 TESTS 70 31 0 1100
91178522 Imakf B Aug. 28, 2020, 4:25 a.m. OK GNU C++11 TESTS 70 31 0 1100
91019060 rudr B Aug. 26, 2020, 5:22 a.m. OK GNU C++11 TESTS 70 31 0 1100
91011356 jy1lnz B Aug. 26, 2020, 2:38 a.m. OK GNU C++11 TESTS 70 31 0 1100
90428108 vedsarkushwaha B Aug. 20, 2020, 2:39 a.m. OK GNU C++11 TESTS 70 31 0 1100
91299504 kamandlabalashekhar B Aug. 29, 2020, 4:35 p.m. OK GNU C++14 TESTS 70 31 0 1100
91313419 From_Earth_to_Mars B Aug. 29, 2020, 9:36 p.m. OK GNU C++14 TESTS 70 31 0 1100
91518076 vjudge3 B Aug. 31, 2020, 6:43 p.m. OK GNU C++14 TESTS 70 31 0 1100
91526052 ARMi B Aug. 31, 2020, 10:12 p.m. OK GNU C++14 TESTS 70 31 0 1100
91543201 dev_91 B Sept. 1, 2020, 7:06 a.m. OK GNU C++14 TESTS 70 31 0 1100
91625771 aditya_cpp B Sept. 2, 2020, 8:51 a.m. OK GNU C++14 TESTS 70 31 0 1100
91634318 Pirate_008 B Sept. 2, 2020, 11:09 a.m. OK GNU C++14 TESTS 70 31 0 1100
91635589 sobhanbera B Sept. 2, 2020, 11:27 a.m. OK GNU C++14 TESTS 70 31 0 1100
91673700 ritulaggarwal B Sept. 2, 2020, 8:40 p.m. OK GNU C++14 TESTS 70 31 0 1100
91706424 nidhishp1407 B Sept. 3, 2020, 10:02 a.m. OK GNU C++14 TESTS 70 31 0 1100
91640396 fxq1304 B Sept. 2, 2020, 12:32 p.m. OK GNU C++17 TESTS 70 31 0 1100
91628772 shubh14am B Sept. 2, 2020, 9:42 a.m. OK GNU C++17 TESTS 70 31 0 1100
91616255 _viper_ B Sept. 2, 2020, 6:17 a.m. OK GNU C++17 TESTS 70 31 0 1100
91596656 Dasha_progr. B Sept. 1, 2020, 7:47 p.m. OK GNU C++17 TESTS 70 31 0 1100
91568437 debrup1201 B Sept. 1, 2020, 1:18 p.m. OK GNU C++17 TESTS 70 31 0 1100
91544539 young_wolf_18 B Sept. 1, 2020, 7:25 a.m. OK GNU C++17 TESTS 70 31 0 1100
91538795 splendid_marvel B Sept. 1, 2020, 5:48 a.m. OK GNU C++17 TESTS 70 31 0 1100
91661066 mittal_sonu B Sept. 2, 2020, 4:53 p.m. OK GNU C++17 TESTS 70 31 0 1100
91522355 hakimarusai B Aug. 31, 2020, 8:12 p.m. OK GNU C++17 TESTS 70 31 0 1100
91323788 Shinchan_Thakur B Aug. 30, 2020, 5:56 a.m. OK GNU C++17 TESTS 70 31 0 1100
90385540 theempireofQin B Aug. 19, 2020, 11:57 a.m. OK GNU C++17 (64) TESTS 70 31 0 1100
91707177 watemus B Sept. 3, 2020, 10:14 a.m. OK GNU C++17 (64) TESTS 70 31 0 1100
91652243 dead_brain05 B Sept. 2, 2020, 3:02 p.m. OK GNU C++17 (64) TESTS 70 31 0 1100
91573870 aarav.cube B Sept. 1, 2020, 2:26 p.m. OK GNU C++17 (64) TESTS 70 31 0 1100
91038961 jesus_coconut B Aug. 26, 2020, 10 a.m. OK GNU C++17 (64) TESTS 70 31 0 1100
91020472 Linter97 B Aug. 26, 2020, 5:44 a.m. OK GNU C++17 (64) TESTS 70 31 0 1100
90897614 sarthak0906 B Aug. 25, 2020, 12:10 p.m. OK GNU C++17 (64) TESTS 70 31 0 1100
90436477 vjudge4 B Aug. 20, 2020, 6:01 a.m. OK GNU C++17 (64) TESTS 70 31 0 1100
90321176 sharrad99 B Aug. 18, 2020, 3:15 p.m. OK GNU C++17 (64) TESTS 70 31 0 1100
90285462 vjudge2 B Aug. 18, 2020, 7:22 a.m. OK GNU C++17 (64) TESTS 70 31 0 1100
91251640 PizzaLovers007 B Aug. 29, 2020, 2:36 a.m. OK Java 11 TESTS 70 187 0 1100
90086859 mphillotry B Aug. 16, 2020, 1:57 p.m. OK Java 11 TESTS 70 202 0 1100
89837487 suryansh.official100 B Aug. 14, 2020, 3:10 a.m. OK Java 11 TESTS 70 202 204800 1100
90737343 gsahil216 B Aug. 23, 2020, 8:03 a.m. OK Java 11 TESTS 70 202 24473600 1100
90671238 YouCantLockUpTheDarkness B Aug. 22, 2020, 8:45 a.m. OK Java 11 TESTS 70 202 26419200 1100
89878268 singhdhanwant B Aug. 14, 2020, 2:29 p.m. OK Java 11 TESTS 70 218 0 1100
90247003 cribabby B Aug. 17, 2020, 4:14 p.m. OK Java 11 TESTS 70 249 10752000 1100
90383942 PratyushS7 B Aug. 19, 2020, 11:33 a.m. OK Java 11 TESTS 70 280 0 1100
90188416 Prathmesh13 B Aug. 17, 2020, 3:16 a.m. OK Java 11 TESTS 70 280 0 1100
90451726 Devilgarud B Aug. 20, 2020, 9:54 a.m. OK Java 11 TESTS 70 280 0 1100
89986073 aya_cool B Aug. 15, 2020, 4:43 a.m. OK Java 8 TESTS 70 124 0 1100
89944037 neeraj96 B Aug. 14, 2020, 4:11 p.m. OK Java 8 TESTS 70 124 0 1100
89938286 himmi_221 B Aug. 14, 2020, 3:57 p.m. OK Java 8 TESTS 70 124 0 1100
89846914 cis_pie B Aug. 14, 2020, 6:31 a.m. OK Java 8 TESTS 70 124 0 1100
89824545 deepanshu.bagri98 B Aug. 13, 2020, 7:42 p.m. OK Java 8 TESTS 70 124 0 1100
90061338 Nirav412000 B Aug. 16, 2020, 6:31 a.m. OK Java 8 TESTS 70 124 0 1100
91654976 appllo B Sept. 2, 2020, 3:35 p.m. OK Java 8 TESTS 70 124 0 1100
91540336 anathema B Sept. 1, 2020, 6:16 a.m. OK Java 8 TESTS 70 124 0 1100
90466477 Rushi5032 B Aug. 20, 2020, 1:32 p.m. OK Java 8 TESTS 70 124 0 1100
90230528 noxious_av B Aug. 17, 2020, 1:09 p.m. OK Java 8 TESTS 70 124 8294400 1100
89834310 Spheniscine B Aug. 14, 2020, 1:43 a.m. OK Kotlin TESTS 70 139 0 1100
89848334 Gompu123 B Aug. 14, 2020, 6:54 a.m. OK Kotlin TESTS 70 155 307200 1100
91657578 koper B Sept. 2, 2020, 4:07 p.m. OK Kotlin TESTS 70 155 409600 1100
91168098 aKn1ghtOut B Aug. 27, 2020, 9:17 p.m. OK Kotlin TESTS 70 218 0 1100
91436321 aueoi B Aug. 30, 2020, 7:49 p.m. OK Mono C# TESTS 70 93 9830400 1100
91334601 hhsaffar B Aug. 30, 2020, 10:39 a.m. OK Mono C# TESTS 70 124 14745600 1100
90053853 AliceNCsyuk B Aug. 16, 2020, 3:13 a.m. OK MS C++ TESTS 70 31 0 1100
90277245 TheSoundOfZero B Aug. 18, 2020, 5:09 a.m. OK MS C++ TESTS 70 31 102400 1100
90156855 elimak B Aug. 16, 2020, 4:50 p.m. OK MS C++ 2017 TESTS 70 46 0 1100
91032193 Still_Theory B Aug. 26, 2020, 8:26 a.m. OK MS C++ 2017 TESTS 70 46 0 1100
90444543 vjudge3 B Aug. 20, 2020, 8:05 a.m. OK MS C++ 2017 TESTS 70 46 0 1100
90498384 your_MaestrO B Aug. 20, 2020, 10:33 p.m. OK MS C++ 2017 TESTS 70 46 307200 1100
90809235 aalakhtin B Aug. 24, 2020, 8:41 a.m. OK MS C++ 2017 TESTS 70 46 3686400 1100
90726942 maryemsalah B Aug. 23, 2020, 4:34 a.m. OK MS C++ 2017 TESTS 70 46 3788800 1100
90540771 MajorLenox B Aug. 21, 2020, 2:34 p.m. OK MS C++ 2017 TESTS 70 46 3788800 1100
90525249 544432 B Aug. 21, 2020, 11:01 a.m. OK MS C++ 2017 TESTS 70 46 3788800 1100
90508817 htija B Aug. 21, 2020, 6:57 a.m. OK MS C++ 2017 TESTS 70 62 3788800 1100
90648830 vjudge3 B Aug. 22, 2020, 3:12 a.m. OK MS C++ 2017 TESTS 70 62 3788800 1100
89935990 Darooha B Aug. 14, 2020, 3:51 p.m. OK Ocaml TESTS 70 31 204800 1100
91552964 yumtam B Sept. 1, 2020, 9:33 a.m. OK PyPy 2 TESTS 70 140 1638400 1100
90362379 bhuya B Aug. 19, 2020, 6:18 a.m. OK PyPy 2 TESTS 70 312 1536000 1100
89830945 Black_Fregat B Aug. 13, 2020, 11:27 p.m. OK PyPy 3 TESTS 70 155 2560000 1100
90098623 FahimSifnatul B Aug. 16, 2020, 2:46 p.m. OK PyPy 3 TESTS 70 170 2457600 1100
89864538 apoorvwatsky B Aug. 14, 2020, 11:09 a.m. OK PyPy 3 TESTS 70 171 2355200 1100
91343172 Goldsmith94 B Aug. 30, 2020, 12:49 p.m. OK PyPy 3 TESTS 70 171 24985600 1100
90686984 ppiedpiper B Aug. 22, 2020, 12:28 p.m. OK PyPy 3 TESTS 70 171 29696000 1100
90353960 DrTrue B Aug. 19, 2020, 3:16 a.m. OK PyPy 3 TESTS 70 186 3993600 1100
89846404 Gauranshu B Aug. 14, 2020, 6:23 a.m. OK PyPy 3 TESTS 70 186 3993600 1100
90210061 Sourav__8 B Aug. 17, 2020, 8:40 a.m. OK PyPy 3 TESTS 70 186 4096000 1100
90520524 J01435K B Aug. 21, 2020, 9:46 a.m. OK PyPy 3 TESTS 70 186 24473600 1100
90520411 europium B Aug. 21, 2020, 9:45 a.m. OK PyPy 3 TESTS 70 186 24473600 1100
91085247 shubakar B Aug. 26, 2020, 6:51 p.m. OK Python 3 TESTS 70 124 307200 1100
90876311 sayuyere B Aug. 25, 2020, 7:07 a.m. OK Python 3 TESTS 70 124 307200 1100
90489672 GregoryK B Aug. 20, 2020, 6:37 p.m. OK Python 3 TESTS 70 124 307200 1100
90307216 freemolly B Aug. 18, 2020, 12:29 p.m. OK Python 3 TESTS 70 124 307200 1100
90084452 SYX B Aug. 16, 2020, 1:19 p.m. OK Python 3 TESTS 70 124 307200 1100
90036705 rahmanberdihojanazarow B Aug. 15, 2020, 5:10 p.m. OK Python 3 TESTS 70 124 307200 1100
90006564 navalpangtey474 B Aug. 15, 2020, 9:36 a.m. OK Python 3 TESTS 70 124 307200 1100
89988950 SaykaT B Aug. 15, 2020, 5:42 a.m. OK Python 3 TESTS 70 124 307200 1100
89987429 TheKingsGaurd B Aug. 15, 2020, 5:18 a.m. OK Python 3 TESTS 70 124 307200 1100
89983341 stocke777 B Aug. 15, 2020, 3:38 a.m. OK Python 3 TESTS 70 124 307200 1100
90002869 Strorkis B Aug. 15, 2020, 8:46 a.m. OK Rust TESTS 70 46 0 1100
90033167 maxglushkov561 B Aug. 15, 2020, 4:10 p.m. OK Rust TESTS 70 140 0 1100
90057986 chicken1925 B Aug. 16, 2020, 5:19 a.m. OK Rust TESTS 70 155 102400 1100

remove filters

Back to search problems