Codeforces Round 841 (Div. 2) and Divide by Zero 2022

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
1731 Codeforces Round 841 (Div. 2) and Divide by Zero 2022 FINISHED False 7200 65028263 Dec. 27, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7394 ) D Valiant's New Map PROGRAMMING binary search brute force data structures dp two pointers

B'Game studio "DbZ Games" wants to introduce another map in their popular game "Valiant". This time, the map named "Panvel" will be based on the city of Mumbai. Mumbai can be represented as n x m cellular grid. Each cell (i, j) ( 1 <= i <= n ; 1 <= j <= m ) of the grid is occupied by a cuboid building of height a_{i,j} . This time, DbZ Games want to make a map that has perfect vertical gameplay. That 's why they want to choose an l x l square inside Mumbai, such that each building inside the square has a height of at least l . Can you help DbZ Games find such a square of the maximum possible size l ? Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= q t <= q 1000 ). Description of the test cases follows. The first line of each test case contains two positive integers n and m ( 1 <= n <= m ; 1 <= q n cdot m <= q 10^6 ). The i -th of next n lines contains m integers a_{i,1}, a_{i,2}, ... , a_{i,m} ( 1 <= q a_{i,j} <= q 10^6 ) -- heights of buildings on the i -th row. It 's guaranteed that the sum of n cdot m over all test cases doesn 't exceed 10^6 . For each test case, print the maximum side length l of the square DbZ Games can choose. In the first test case, we can choose the square of side l = 2 (i. e. the whole grid) since the heights of all buildings are greater than or equal to 2 . In the second test case, we can only choose the side as 1 , so the answer is 1 . In the third test case, there are no squares of size 2 that have all buildings of height at least 2 , so the answer is 1 . '...

Tutorials

Codeforces Round #841 (Div. 2) and Divide By Zero 2022 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
187165008 ruban D Dec. 29, 2022, 4:33 p.m. OK Delphi TESTS 40 717 90828800
187165107 ruban D Dec. 29, 2022, 4:34 p.m. OK FPC TESTS 40 498 90828800
187107417 Mars_Dingdang D Dec. 29, 2022, 6:50 a.m. OK GNU C++14 TESTS 40 62 18124800
187064506 k720 D Dec. 28, 2022, 5:36 p.m. OK GNU C++14 TESTS 40 233 20275200
187142924 Prasanna_Jangali D Dec. 29, 2022, 1:16 p.m. OK GNU C++14 TESTS 40 248 28057600
187105696 iprom D Dec. 29, 2022, 6:29 a.m. OK GNU C++14 TESTS 40 249 11980800
187042133 Haoe D Dec. 28, 2022, 1:52 p.m. OK GNU C++14 TESTS 40 249 11980800
187404603 02Darling D Dec. 31, 2022, 4:24 a.m. OK GNU C++14 TESTS 40 249 16076800
187098981 Fiatiustitia D Dec. 29, 2022, 4:53 a.m. OK GNU C++14 TESTS 40 249 20070400
187084390 InfiniteChallenge D Dec. 28, 2022, 9:54 p.m. OK GNU C++14 TESTS 40 249 28057600
187110922 zwu2021016339 D Dec. 29, 2022, 7:32 a.m. OK GNU C++14 TESTS 40 249 38912000
187165800 Edgedancer D Dec. 29, 2022, 4:41 p.m. OK GNU C++14 TESTS 40 264 7987200
187248771 The_Dark_Storm D Dec. 30, 2022, 1:54 p.m. OK GNU C++17 TESTS 40 187 12390400
187466042 mutharib D Dec. 31, 2022, 4:42 p.m. OK GNU C++17 TESTS 40 218 12697600
187163101 MesSimonFallon19 D Dec. 29, 2022, 4:16 p.m. OK GNU C++17 TESTS 40 233 20070400
187191816 CodeAssignment D Dec. 29, 2022, 10:47 p.m. OK GNU C++17 TESTS 40 233 40038400
187420228 korean D Dec. 31, 2022, 7:43 a.m. OK GNU C++17 TESTS 40 234 8499200
187405164 wrightzhou D Dec. 31, 2022, 4:36 a.m. OK GNU C++17 TESTS 40 234 11980800
187163037 MesSimonFallon19 D Dec. 29, 2022, 4:15 p.m. OK GNU C++17 TESTS 40 234 20070400
187209406 NNW D Dec. 30, 2022, 6:20 a.m. OK GNU C++17 TESTS 40 248 12083200
187200804 yolx D Dec. 30, 2022, 3:47 a.m. OK GNU C++17 TESTS 40 248 12902400
187212922 Fighoh D Dec. 30, 2022, 7:06 a.m. OK GNU C++17 TESTS 40 248 20070400
187029517 N_z__ D Dec. 28, 2022, 11:36 a.m. OK GNU C++17 (64) TESTS 40 140 32256000
187058486 OpiumCat D Dec. 28, 2022, 4:35 p.m. OK GNU C++17 (64) TESTS 40 170 12288000
187189153 liut D Dec. 29, 2022, 9:40 p.m. OK GNU C++17 (64) TESTS 40 171 8704000
187175399 MyWaifuSatouMatsuzaka D Dec. 29, 2022, 6:11 p.m. OK GNU C++17 (64) TESTS 40 171 11980800
187060815 van_hoang D Dec. 28, 2022, 4:58 p.m. OK GNU C++17 (64) TESTS 40 171 11980800
187109609 dimss D Dec. 29, 2022, 7:16 a.m. OK GNU C++17 (64) TESTS 40 171 16076800
187446593 Lucky7 D Dec. 31, 2022, 12:50 p.m. OK GNU C++17 (64) TESTS 40 171 17305600
187030000 wtz2333 D Dec. 28, 2022, 11:41 a.m. OK GNU C++17 (64) TESTS 40 171 20889600
187057267 cjk041212 D Dec. 28, 2022, 4:22 p.m. OK GNU C++17 (64) TESTS 40 171 112230400
187197736 urBCI D Dec. 30, 2022, 2:25 a.m. OK GNU C++17 (64) TESTS 40 186 8704000
187126413 final_prac_acc D Dec. 29, 2022, 10:30 a.m. OK GNU C++20 (64) TESTS 40 124 11980800
187127162 final_prac_acc D Dec. 29, 2022, 10:38 a.m. OK GNU C++20 (64) TESTS 40 139 11980800
187121976 final_prac_acc D Dec. 29, 2022, 9:41 a.m. OK GNU C++20 (64) TESTS 40 140 7987200
187095254 Nea1 D Dec. 29, 2022, 3:29 a.m. OK GNU C++20 (64) TESTS 40 140 8704000
187127845 final_prac_acc D Dec. 29, 2022, 10:46 a.m. OK GNU C++20 (64) TESTS 40 140 11980800
187127677 final_prac_acc D Dec. 29, 2022, 10:44 a.m. OK GNU C++20 (64) TESTS 40 140 11980800
187127225 final_prac_acc D Dec. 29, 2022, 10:39 a.m. OK GNU C++20 (64) TESTS 40 140 11980800
187126917 final_prac_acc D Dec. 29, 2022, 10:36 a.m. OK GNU C++20 (64) TESTS 40 140 11980800
187125236 final_prac_acc D Dec. 29, 2022, 10:19 a.m. OK GNU C++20 (64) TESTS 40 140 11980800
187031384 4rrow D Dec. 28, 2022, 11:56 a.m. OK GNU C++20 (64) TESTS 40 140 11980800
187075679 daftdove D Dec. 28, 2022, 7:43 p.m. OK Java 11 TESTS 40 374 25088000
187167139 djrfrn D Dec. 29, 2022, 4:54 p.m. OK Java 11 TESTS 40 389 18841600
187052803 __Serendipity D Dec. 28, 2022, 3:35 p.m. OK Java 11 TESTS 40 389 32256000
187136563 dinosparton_013 D Dec. 29, 2022, 12:12 p.m. OK Java 11 TESTS 40 405 19046400
187134086 tushar19280 D Dec. 29, 2022, 11:47 a.m. OK Java 11 TESTS 40 514 19148800
187174581 newdoct D Dec. 29, 2022, 6:03 p.m. OK Java 11 TESTS 40 561 86323200
187434448 charan2628 D Dec. 31, 2022, 10:30 a.m. OK Java 11 TESTS 40 592 86528000
187070283 pras7946 D Dec. 28, 2022, 6:35 p.m. OK Java 11 TESTS 40 670 18944000
187209917 ilasiawo D Dec. 30, 2022, 6:27 a.m. OK Java 11 TESTS 40 1279 11059200
187400714 crystaly D Dec. 31, 2022, 2:55 a.m. OK Java 11 TESTS 40 1294 20582400
187144036 Vrutik_2809 D Dec. 29, 2022, 1:27 p.m. OK Java 17 TESTS 40 327 11264000
187051218 ayushdragneel27 D Dec. 28, 2022, 3:18 p.m. OK Java 17 TESTS 40 467 60620800
187196619 CCS_Covenant D Dec. 30, 2022, 1:48 a.m. OK Java 17 TESTS 40 499 20992000
187086820 Eslam_Ahmed D Dec. 28, 2022, 10:49 p.m. OK Java 17 TESTS 40 560 57856000
187086850 Eslam_Ahmed D Dec. 28, 2022, 10:50 p.m. OK Java 17 TESTS 40 685 56934400
187041474 im_Crush24 D Dec. 28, 2022, 1:46 p.m. OK Java 17 TESTS 40 967 19148800
187458761 kishan963 D Dec. 31, 2022, 3:12 p.m. OK Java 8 TESTS 40 280 51097600
187250463 tyrion_123 D Dec. 30, 2022, 2:11 p.m. OK Java 8 TESTS 40 296 37171200
187046965 cys02 D Dec. 28, 2022, 2:35 p.m. OK Java 8 TESTS 40 296 94412800
187131862 rational_fool D Dec. 29, 2022, 11:25 a.m. OK Java 8 TESTS 40 311 37273600
187239504 Mohamed308 D Dec. 30, 2022, 12:20 p.m. OK Java 8 TESTS 40 311 43008000
187461513 dingmingcheng D Dec. 31, 2022, 3:46 p.m. OK Java 8 TESTS 40 311 47104000
187053139 EricM08 D Dec. 28, 2022, 3:38 p.m. OK Java 8 TESTS 40 358 47001600
187098922 Mohamed_Ahmed D Dec. 29, 2022, 4:51 a.m. OK Java 8 TESTS 40 404 43008000
187252435 naitikvarshney D Dec. 30, 2022, 2:30 p.m. OK Java 8 TESTS 40 436 42291200
187360444 aryaman_571 D Dec. 30, 2022, 4:49 p.m. OK Java 8 TESTS 40 514 43008000
187029401 sky D Dec. 28, 2022, 11:35 a.m. OK Kotlin 1.6 TESTS 40 904 114585600
187029143 sky D Dec. 28, 2022, 11:32 a.m. OK Kotlin 1.6 TESTS 40 935 114585600
187245000 duckladydinh D Dec. 30, 2022, 1:16 p.m. OK Kotlin 1.7 TESTS 40 889 133427200
187244621 duckladydinh D Dec. 30, 2022, 1:12 p.m. OK Kotlin 1.7 TESTS 40 889 163020800
187244101 duckladydinh D Dec. 30, 2022, 1:06 p.m. OK Kotlin 1.7 TESTS 40 1014 162099200
187243806 duckladydinh D Dec. 30, 2022, 1:03 p.m. OK Kotlin 1.7 TESTS 40 1169 162304000
187243762 duckladydinh D Dec. 30, 2022, 1:03 p.m. OK Kotlin 1.7 TESTS 40 1231 162508800
187457151 ktropin D Dec. 31, 2022, 2:53 p.m. OK Mono C# TESTS 40 482 119808000
187456327 ktropin D Dec. 31, 2022, 2:44 p.m. OK Mono C# TESTS 40 514 119808000
187039782 hacastle D Dec. 28, 2022, 1:31 p.m. OK MS C++ 2017 TESTS 40 1138 7065600
187037717 hacastle D Dec. 28, 2022, 1:12 p.m. OK MS C++ 2017 TESTS 40 1138 7884800
187189169 1_2_3_4_5_9 D Dec. 29, 2022, 9:40 p.m. OK PyPy 3 TESTS 40 623 106905600
187172213 torqueaj D Dec. 29, 2022, 5:42 p.m. OK PyPy 3 TESTS 40 998 71782400
187089005 YMSeah D Dec. 28, 2022, 11:54 p.m. OK PyPy 3 TESTS 40 1216 93286400
187035861 YMSeah D Dec. 28, 2022, 12:44 p.m. OK PyPy 3 TESTS 40 1824 80998400
187189382 Remineva D Dec. 29, 2022, 9:45 p.m. OK PyPy 3-64 TESTS 40 452 80281600
187159211 big_aL D Dec. 29, 2022, 3:39 p.m. OK PyPy 3-64 TESTS 40 467 100147200
187096405 Youarenotgood D Dec. 29, 2022, 3:58 a.m. OK PyPy 3-64 TESTS 40 499 111206400
187197627 Turtleeee D Dec. 30, 2022, 2:21 a.m. OK PyPy 3-64 TESTS 40 514 104960000
187233245 PotatoKnight D Dec. 30, 2022, 11:07 a.m. OK PyPy 3-64 TESTS 40 514 107315200
187203444 zlfn D Dec. 30, 2022, 4:46 a.m. OK PyPy 3-64 TESTS 40 514 109977600
187403148 alanmiller D Dec. 31, 2022, 3:52 a.m. OK PyPy 3-64 TESTS 40 514 131891200
187073177 prateek.goel.cs.2019 D Dec. 28, 2022, 7:13 p.m. OK PyPy 3-64 TESTS 40 530 100249600
187063635 titia D Dec. 28, 2022, 5:27 p.m. OK PyPy 3-64 TESTS 40 561 111206400
187066971 Anlx2000 D Dec. 28, 2022, 6 p.m. OK PyPy 3-64 TESTS 40 577 107724800
187243504 cottoncotton D Dec. 30, 2022, 1 p.m. OK Rust 2021 TESTS 40 170 75980800
187054005 minus400eq D Dec. 28, 2022, 3:47 p.m. OK Rust 2021 TESTS 40 218 66969600
187078813 coffee-addict D Dec. 28, 2022, 8:25 p.m. OK Rust 2021 TESTS 40 234 42803200
187200714 Benq D Dec. 30, 2022, 3:45 a.m. OK Rust 2021 TESTS 40 405 66969600

remove filters

Back to search problems