Codeforces Round 915 (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
1905 Codeforces Round 915 (Div. 2) FINISHED False 7200 34442663 Dec. 16, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 23332 ) A Constructive Problems PROGRAMMING math

B"Gridlandia has been hit by flooding and now has to reconstruct all of it's cities. Gridlandia can be described by an n x m matrix. Initially, all of its cities are in economic collapse. The government can choose to rebuild certain cities. Additionally, any collapsed city which has at least one vertically neighboring rebuilt city and at least one horizontally neighboring rebuilt city can ask for aid from them and become rebuilt without help from the government. More formally, collapsed city positioned in (i, j) can become rebuilt if both of the following conditions are satisfied: If the city is located on the border of the matrix and has only one horizontally or vertically neighbouring city, then we consider only that city. The government wants to know the minimum number of cities it has to rebuild such that after some time all the cities can be rebuild. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The only line of each test case contains two integers n and m ( 2 <= n, m <= 100 ) -- the sizes of Gridlandia. For each test case, output a single integer -- the minimum number of cities the government needs to rebuild. In the first test case, it's enough for the government to rebuild cities (1, 2) and (2, 1) . In the second test case, it's enough for the government to rebuild cities (1, 4) , (2, 2) , (3, 1) , (3, 6) , (4, 3) , (5, 5) , (5, 7) . "...

Tutorials

Codeforces Round 915 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
237571501 asutosh1998 A Dec. 17, 2023, 5:45 a.m. OK C# 10 TESTS 3 109 1843200
237571030 literally A Dec. 17, 2023, 5:38 a.m. OK Clang++17 Diagnostics TESTS 3 140 0
237567172 KASHEM A Dec. 17, 2023, 4:29 a.m. OK Clang++17 Diagnostics TESTS 3 202 16588800
237559744 askuyy A Dec. 17, 2023, 1:34 a.m. OK Clang++20 Diagnostics TESTS 3 156 512000
237533376 A_IGOR A Dec. 16, 2023, 5:27 p.m. OK Delphi TESTS 3 30 0
237561174 AlexZverev2007 A Dec. 17, 2023, 2:12 a.m. OK FPC TESTS 3 31 0
237543931 NenadDapic A Dec. 16, 2023, 7:15 p.m. OK FPC TESTS 3 46 102400
237520695 Utkk_1 A Dec. 16, 2023, 4:18 p.m. OK GNU C11 TESTS 3 31 0
237534800 Calvin65 A Dec. 16, 2023, 5:40 p.m. OK GNU C11 TESTS 3 31 0
237533511 Nishant_2728 A Dec. 16, 2023, 5:28 p.m. OK GNU C11 TESTS 3 46 0
237536556 AyushRaj3011 A Dec. 16, 2023, 5:57 p.m. OK GNU C11 TESTS 3 46 0
237539299 fatehkabir A Dec. 16, 2023, 6:23 p.m. OK GNU C11 TESTS 3 46 0
237520123 Zainarahman A Dec. 16, 2023, 4:16 p.m. OK GNU C11 TESTS 3 46 0
237564428 R1mer A Dec. 17, 2023, 3:30 a.m. OK GNU C11 TESTS 3 46 0
237560571 Humaira228 A Dec. 17, 2023, 1:56 a.m. OK GNU C11 TESTS 3 46 0
237565154 Naurina_Haque A Dec. 17, 2023, 3:44 a.m. OK GNU C11 TESTS 3 46 0
237524841 wajih06064 A Dec. 16, 2023, 4:29 p.m. OK GNU C11 TESTS 3 46 0
237568324 dctc800d A Dec. 17, 2023, 4:52 a.m. OK GNU C++14 TESTS 3 0 0
237557024 zltzlt A Dec. 16, 2023, 11:49 p.m. OK GNU C++14 TESTS 3 0 0
237544371 minus_50 A Dec. 16, 2023, 7:21 p.m. OK GNU C++14 TESTS 3 0 0
237533180 prashant__ A Dec. 16, 2023, 5:25 p.m. OK GNU C++14 TESTS 3 0 0
237529129 mmated A Dec. 16, 2023, 4:58 p.m. OK GNU C++14 TESTS 3 0 0
237572166 utkarsh_b A Dec. 17, 2023, 5:55 a.m. OK GNU C++14 TESTS 3 0 0
237571150 lakshay7 A Dec. 17, 2023, 5:40 a.m. OK GNU C++14 TESTS 3 0 0
237571483 atharvaayir A Dec. 17, 2023, 5:45 a.m. OK GNU C++14 TESTS 3 15 0
237569056 andy2020 A Dec. 17, 2023, 5:06 a.m. OK GNU C++14 TESTS 3 15 0
237569303 GuessForces A Dec. 17, 2023, 5:10 a.m. OK GNU C++14 TESTS 3 15 0
237551028 M_A_K_L_A_D A Dec. 16, 2023, 9:03 p.m. OK GNU C++17 TESTS 3 0 0
237555366 Benn A Dec. 16, 2023, 10:47 p.m. OK GNU C++17 TESTS 3 0 0
237557218 Arrogant_sword A Dec. 16, 2023, 11:56 p.m. OK GNU C++17 TESTS 3 0 0
237561497 sitaram_268 A Dec. 17, 2023, 2:21 a.m. OK GNU C++17 TESTS 3 0 0
237564148 rezowanology A Dec. 17, 2023, 3:24 a.m. OK GNU C++17 TESTS 3 0 0
237536126 Super-SoniC-71 A Dec. 16, 2023, 5:53 p.m. OK GNU C++17 TESTS 3 0 0
237532773 goel_sans A Dec. 16, 2023, 5:21 p.m. OK GNU C++17 TESTS 3 0 0
237534676 Breathh A Dec. 16, 2023, 5:39 p.m. OK GNU C++17 TESTS 3 0 0
237531365 maheratef74 A Dec. 16, 2023, 5:11 p.m. OK GNU C++17 TESTS 3 0 0
237530274 coldbr3w A Dec. 16, 2023, 5:04 p.m. OK GNU C++17 TESTS 3 0 0
237569674 Rikkual A Dec. 17, 2023, 5:16 a.m. OK GNU C++17 (64) TESTS 3 0 0
237569403 Sy_03 A Dec. 17, 2023, 5:12 a.m. OK GNU C++17 (64) TESTS 3 0 0
237568335 practice13 A Dec. 17, 2023, 4:53 a.m. OK GNU C++17 (64) TESTS 3 0 0
237563594 wly666... A Dec. 17, 2023, 3:11 a.m. OK GNU C++17 (64) TESTS 3 0 0
237561602 Netzach999 A Dec. 17, 2023, 2:24 a.m. OK GNU C++17 (64) TESTS 3 0 0
237558042 Winding. A Dec. 17, 2023, 12:32 a.m. OK GNU C++17 (64) TESTS 3 0 0
237557792 enslaved A Dec. 17, 2023, 12:21 a.m. OK GNU C++17 (64) TESTS 3 0 0
237553163 SneiderQuintero A Dec. 16, 2023, 9:46 p.m. OK GNU C++17 (64) TESTS 3 0 0
237548057 settingsuns A Dec. 16, 2023, 8:12 p.m. OK GNU C++17 (64) TESTS 3 0 0
237533904 wuzihan A Dec. 16, 2023, 5:32 p.m. OK GNU C++17 (64) TESTS 3 0 0
237570935 bharadwajkunal172 A Dec. 17, 2023, 5:37 a.m. OK GNU C++20 (64) TESTS 3 0 0
237571369 lostbuddyonearth A Dec. 17, 2023, 5:43 a.m. OK GNU C++20 (64) TESTS 3 0 0
237571466 YakultGo A Dec. 17, 2023, 5:45 a.m. OK GNU C++20 (64) TESTS 3 0 0
237571554 apgpsoop A Dec. 17, 2023, 5:46 a.m. OK GNU C++20 (64) TESTS 3 0 0
237571840 rb003 A Dec. 17, 2023, 5:51 a.m. OK GNU C++20 (64) TESTS 3 0 0
237571876 dil_se_coder A Dec. 17, 2023, 5:51 a.m. OK GNU C++20 (64) TESTS 3 0 0
237572429 othmaine A Dec. 17, 2023, 5:59 a.m. OK GNU C++20 (64) TESTS 3 0 0
237572444 Yxc__ A Dec. 17, 2023, 5:59 a.m. OK GNU C++20 (64) TESTS 3 0 0
237572516 Yxc__ A Dec. 17, 2023, 6 a.m. OK GNU C++20 (64) TESTS 3 0 0
237572599 uncleliushibo A Dec. 17, 2023, 6:01 a.m. OK GNU C++20 (64) TESTS 3 0 0
237529045 chonchon2605 A Dec. 16, 2023, 4:57 p.m. OK Go TESTS 3 46 614400
237560583 sergileon A Dec. 17, 2023, 1:57 a.m. OK Java 11 TESTS 3 186 0
237522519 C_nena_E A Dec. 16, 2023, 4:23 p.m. OK Java 11 TESTS 3 218 0
237570002 _not_found A Dec. 17, 2023, 5:22 a.m. OK Java 11 TESTS 3 280 0
237568848 ahanasaha01 A Dec. 17, 2023, 5:02 a.m. OK Java 11 TESTS 3 280 0
237541918 mrizzzz_03 A Dec. 16, 2023, 6:51 p.m. OK Java 11 TESTS 3 280 0
237522367 klu_2100031869 A Dec. 16, 2023, 4:22 p.m. OK Java 11 TESTS 3 280 0
237515873 Abhi0910 A Dec. 16, 2023, 4:04 p.m. OK Java 11 TESTS 3 280 0
237532522 rajneesh.osho A Dec. 16, 2023, 5:19 p.m. OK Java 11 TESTS 3 295 0
237565435 Saketh_Naga_Sreenivas A Dec. 17, 2023, 3:50 a.m. OK Java 11 TESTS 3 296 0
237537892 abmishra95320 A Dec. 16, 2023, 6:09 p.m. OK Java 11 TESTS 3 296 0
237525590 mlangc A Dec. 16, 2023, 4:31 p.m. OK Java 17 TESTS 3 124 204800
237535042 dineshchandran311 A Dec. 16, 2023, 5:42 p.m. OK Java 17 TESTS 3 186 409600
237548818 ayush_tiwari26 A Dec. 16, 2023, 8:24 p.m. OK Java 17 TESTS 3 187 409600
237563068 Hang_We_Hong A Dec. 17, 2023, 2:59 a.m. OK Java 17 TESTS 3 218 0
237514844 Aasritha_V_V A Dec. 16, 2023, 4:01 p.m. OK Java 17 TESTS 3 233 0
237537547 yash11_rai A Dec. 16, 2023, 6:06 p.m. OK Java 17 TESTS 3 233 614400
237537473 mangos194 A Dec. 16, 2023, 6:06 p.m. OK Java 17 TESTS 3 234 409600
237516413 21r21a6702 A Dec. 16, 2023, 4:05 p.m. OK Java 17 TESTS 3 248 512000
237537386 Hardinaik A Dec. 16, 2023, 6:05 p.m. OK Java 17 TESTS 3 249 409600
237520586 navya_1118 A Dec. 16, 2023, 4:17 p.m. OK Java 17 TESTS 3 249 716800
237552233 java_noob69 A Dec. 16, 2023, 9:26 p.m. OK Java 21 TESTS 3 202 15974400
237556490 Bluffish A Dec. 16, 2023, 11:27 p.m. OK Java 21 TESTS 3 218 204800
237523398 CHITHRAM_SAITEJA A Dec. 16, 2023, 4:25 p.m. OK Java 21 TESTS 3 311 0
237558076 goalboy A Dec. 17, 2023, 12:33 a.m. OK Java 21 TESTS 3 311 204800
237519565 21R01A7356 A Dec. 16, 2023, 4:14 p.m. OK Java 21 TESTS 3 311 512000
237515534 rudsi A Dec. 16, 2023, 4:03 p.m. OK Java 21 TESTS 3 311 716800
237552417 karanboi A Dec. 16, 2023, 9:31 p.m. OK Java 21 TESTS 3 327 204800
237515562 rathodmahender04 A Dec. 16, 2023, 4:03 p.m. OK Java 21 TESTS 3 342 512000
237548956 emexnord A Dec. 16, 2023, 8:26 p.m. OK Java 21 TESTS 3 343 0
237514593 cse_30486 A Dec. 16, 2023, 4 p.m. OK Java 21 TESTS 3 373 0
237548691 Sumitsingh7 A Dec. 16, 2023, 8:22 p.m. OK Java 8 TESTS 3 155 5836800
237571362 nitinsaichowdarychava A Dec. 17, 2023, 5:43 a.m. OK Java 8 TESTS 3 156 0
237540647 American_Eagle A Dec. 16, 2023, 6:37 p.m. OK Java 8 TESTS 3 186 0
237534096 Nirvanaa A Dec. 16, 2023, 5:34 p.m. OK Java 8 TESTS 3 186 0
237531398 anupriya121 A Dec. 16, 2023, 5:11 p.m. OK Java 8 TESTS 3 186 0
237523284 Steffi A Dec. 16, 2023, 4:25 p.m. OK Java 8 TESTS 3 217 0
237566754 Shiladitya2003 A Dec. 17, 2023, 4:20 a.m. OK Java 8 TESTS 3 218 0
237518206 yashdangar A Dec. 16, 2023, 4:10 p.m. OK Java 8 TESTS 3 218 0
237563923 nandu_2414 A Dec. 17, 2023, 3:19 a.m. OK Java 8 TESTS 3 233 0
237524542 cmpunk.rockzz A Dec. 16, 2023, 4:29 p.m. OK Java 8 TESTS 3 233 0
237516815 teinawa A Dec. 16, 2023, 4:06 p.m. OK JavaScript TESTS 3 46 1331200
237529461 samestimable2016 A Dec. 16, 2023, 4:59 p.m. OK Kotlin 1.9 TESTS 3 233 0
237516289 Letmecry A Dec. 16, 2023, 4:05 p.m. OK Kotlin 1.9 TESTS 3 592 14643200
237543671 zetiboom A Dec. 16, 2023, 7:12 p.m. OK MS C++ 2017 TESTS 3 31 0
237520164 Rama_13 A Dec. 16, 2023, 4:16 p.m. OK MS C++ 2017 TESTS 3 31 102400
237571165 magician_Y A Dec. 17, 2023, 5:40 a.m. OK MS C++ 2017 TESTS 3 46 0
237552404 xghouftw A Dec. 16, 2023, 9:30 p.m. OK MS C++ 2017 TESTS 3 46 0
237535105 DmacOP A Dec. 16, 2023, 5:43 p.m. OK MS C++ 2017 TESTS 3 46 0
237570512 Ravitosh A Dec. 17, 2023, 5:30 a.m. OK MS C++ 2017 TESTS 3 61 0
237528964 sumitchaudhary2005 A Dec. 16, 2023, 4:57 p.m. OK MS C++ 2017 TESTS 3 61 0
237519932 codermj A Dec. 16, 2023, 4:15 p.m. OK MS C++ 2017 TESTS 3 61 0
237515483 Lengcha A Dec. 16, 2023, 4:02 p.m. OK MS C++ 2017 TESTS 3 61 0
237559901 albom45674 A Dec. 17, 2023, 1:39 a.m. OK PHP TESTS 3 77 0
237550540 khanter_ A Dec. 16, 2023, 8:54 p.m. OK PyPy 3 TESTS 3 124 4505600
237540008 aymane.moataz3 A Dec. 16, 2023, 6:30 p.m. OK PyPy 3 TESTS 3 124 5017600
237560555 conqueror_of_womais A Dec. 17, 2023, 1:56 a.m. OK PyPy 3 TESTS 3 140 4710400
237553743 EvGen1u5 A Dec. 16, 2023, 9:59 p.m. OK PyPy 3 TESTS 3 249 4812800
237546616 Sovi_11 A Dec. 16, 2023, 7:51 p.m. OK PyPy 3 TESTS 3 249 5324800
237562363 Giantpanda A Dec. 17, 2023, 2:42 a.m. OK PyPy 3 TESTS 3 264 5017600
237568584 tnv2004 A Dec. 17, 2023, 4:57 a.m. OK PyPy 3 TESTS 3 264 5120000
237558830 rgupta765 A Dec. 17, 2023, 1:03 a.m. OK PyPy 3 TESTS 3 280 5120000
237544732 SamuelTull A Dec. 16, 2023, 7:26 p.m. OK PyPy 3-64 TESTS 3 61 1945600
237549510 rmr A Dec. 16, 2023, 8:36 p.m. OK PyPy 3-64 TESTS 3 61 2560000
237564023 skim83 A Dec. 17, 2023, 3:21 a.m. OK PyPy 3-64 TESTS 3 77 4300800
237529818 JustTheory A Dec. 16, 2023, 5:01 p.m. OK PyPy 3-64 TESTS 3 78 7372800
237550734 Dert30 A Dec. 16, 2023, 8:57 p.m. OK PyPy 3-64 TESTS 3 92 7168000
237532253 AndreiZherder A Dec. 16, 2023, 5:17 p.m. OK PyPy 3-64 TESTS 3 93 4915200
237569673 _Kee A Dec. 17, 2023, 5:16 a.m. OK PyPy 3-64 TESTS 3 93 5427200
237547168 bruher A Dec. 16, 2023, 7:59 p.m. OK PyPy 3-64 TESTS 3 93 5836800
237545608 kinglykang A Dec. 16, 2023, 7:36 p.m. OK PyPy 3-64 TESTS 3 93 6246400
237564479 Youarenotgood A Dec. 17, 2023, 3:31 a.m. OK PyPy 3-64 TESTS 3 93 6758400
237541772 madhav48 A Dec. 16, 2023, 6:50 p.m. OK Python 3 TESTS 3 46 409600
237564910 Saikrishna1653 A Dec. 17, 2023, 3:39 a.m. OK Python 3 TESTS 3 46 819200
237528897 zhdanovich A Dec. 16, 2023, 4:57 p.m. OK Python 3 TESTS 3 46 819200
237555903 K_Bengal_20 A Dec. 16, 2023, 11:05 p.m. OK Python 3 TESTS 3 46 921600
237522989 amar31661 A Dec. 16, 2023, 4:24 p.m. OK Python 3 TESTS 3 61 409600
237538881 codeforcesHQ A Dec. 16, 2023, 6:19 p.m. OK Python 3 TESTS 3 62 819200
237516952 NewProgrammist2023 A Dec. 16, 2023, 4:07 p.m. OK Python 3 TESTS 3 62 1126400
237521237 chaithanya_0609 A Dec. 16, 2023, 4:19 p.m. OK Python 3 TESTS 3 62 1228800
237517281 KLU_2100031104 A Dec. 16, 2023, 4:08 p.m. OK Python 3 TESTS 3 77 102400
237517066 RajatSoni07 A Dec. 16, 2023, 4:07 p.m. OK Python 3 TESTS 3 77 102400
237571414 0x81 A Dec. 17, 2023, 5:44 a.m. OK Ruby 3 TESTS 3 420 716800
237536273 vstiff A Dec. 16, 2023, 5:54 p.m. OK Rust 2021 TESTS 3 77 0

remove filters

Back to search problems