Codeforces Round 922 (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
1918 Codeforces Round 922 (Div. 2) FINISHED False 7800 30554663 Jan. 30, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 30718 ) A Brick Wall PROGRAMMING constructive algorithms greedy implementation math

B'A brick is a strip of size 1 x k , placed horizontally or vertically, where k can be an arbitrary number that is at least 2 ( k ge 2 ). A brick wall of size n x m is such a way to place several bricks inside a rectangle n x m , that all bricks lie either horizontally or vertically in the cells, do not cross the border of the rectangle, and that each cell of the n x m rectangle belongs to exactly one brick. Here n is the height of the rectangle n x m and m is the width. Note that there can be bricks with different values of k in the same brick wall. The wall stability is the difference between the number of horizontal bricks and the number of vertical bricks. Note that if you used 0 horizontal bricks and 2 vertical ones, then the stability will be -2 , not 2 . What is the maximal possible stability of a wall of size n x m ? It is guaranteed that under restrictions in the statement at least one n x m wall exists. The first line of the input contains one integer t ( 1 <= t <= 10 ,000 ), the number of test cases. The only line of each test case contains two integers n and m ( 2 <= n, ,m <= 10^4 ). For each test case, print one integer, the maximum stability of a wall of size n x m . In the 1st test case, the maximum stability of 2 is obtained by placing two horizontal bricks 1 x 2 one on top of the other. In the 2nd test case, one can get the maximum stability of 28 by placing 4 horizontal bricks 1 x 2 in each of the 7 rows. '...

Tutorials

Codeforces Round #922 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
244179829 bluemegane A Jan. 30, 2024, 10:33 p.m. OK C# 8 TESTS 5 109 1740800
244179485 riskywindow A Jan. 30, 2024, 10:24 p.m. OK Clang++17 Diagnostics TESTS 5 155 0
244191550 Subh_Raj_Shaw A Jan. 31, 2024, 2:34 a.m. OK Clang++17 Diagnostics TESTS 5 171 0
244165994 Professor07 A Jan. 30, 2024, 7:33 p.m. OK Clang++17 Diagnostics TESTS 5 171 0
244160640 nav_01 A Jan. 30, 2024, 6:51 p.m. OK Clang++17 Diagnostics TESTS 5 171 0
244207777 IT_s_OVER_9000 A Jan. 31, 2024, 5:42 a.m. OK Clang++17 Diagnostics TESTS 5 186 0
244189073 rdtusher A Jan. 31, 2024, 1:57 a.m. OK Clang++20 Diagnostics TESTS 5 171 0
244183666 zakran A Jan. 31, 2024, 12:06 a.m. OK Clang++20 Diagnostics TESTS 5 186 0
244156741 sakeef_IuIct A Jan. 30, 2024, 6:28 p.m. OK GNU C11 TESTS 5 46 307200
244139481 10062003 A Jan. 30, 2024, 4:31 p.m. OK GNU C11 TESTS 5 46 307200
244167431 tanimsk A Jan. 30, 2024, 7:46 p.m. OK GNU C11 TESTS 5 46 307200
244141423 Maisha106 A Jan. 30, 2024, 4:36 p.m. OK GNU C11 TESTS 5 61 204800
244196010 kingAB A Jan. 31, 2024, 3:34 a.m. OK GNU C11 TESTS 5 61 307200
244135874 Sharnnatm A Jan. 30, 2024, 4:21 p.m. OK GNU C11 TESTS 5 62 0
244134872 ranisindhuroy2004 A Jan. 30, 2024, 4:19 p.m. OK GNU C11 TESTS 5 62 307200
244141613 RaghuRam1233 A Jan. 30, 2024, 4:36 p.m. OK GNU C11 TESTS 5 77 0
244186372 Humaira228 A Jan. 31, 2024, 1:04 a.m. OK GNU C11 TESTS 5 77 0
244163902 Digbijoy_2203104 A Jan. 30, 2024, 7:15 p.m. OK GNU C11 TESTS 5 78 0
244156573 ca_09_04 A Jan. 30, 2024, 6:27 p.m. OK GNU C++17 TESTS 5 0 0
244200819 CepryH9 A Jan. 31, 2024, 4:39 a.m. OK GNU C++17 TESTS 5 0 0
244206566 md_nihal A Jan. 31, 2024, 5:31 a.m. OK GNU C++17 TESTS 5 15 0
244208807 dagger_happy A Jan. 31, 2024, 5:51 a.m. OK GNU C++17 TESTS 5 15 0
244209043 Sankalp_12 A Jan. 31, 2024, 5:54 a.m. OK GNU C++17 TESTS 5 15 0
244209203 iamfbb A Jan. 31, 2024, 5:55 a.m. OK GNU C++17 TESTS 5 15 0
244209612 some_like_it_hot A Jan. 31, 2024, 5:59 a.m. OK GNU C++17 TESTS 5 15 0
244209877 lovezz A Jan. 31, 2024, 6:01 a.m. OK GNU C++17 TESTS 5 15 0
244209891 tanmay_186 A Jan. 31, 2024, 6:01 a.m. OK GNU C++17 TESTS 5 15 0
244208699 green-eyeliner A Jan. 31, 2024, 5:50 a.m. OK GNU C++17 TESTS 5 15 0
244189156 wendyasif A Jan. 31, 2024, 1:58 a.m. OK GNU C++17 (64) TESTS 5 0 0
244185277 chappy1 A Jan. 31, 2024, 12:43 a.m. OK GNU C++17 (64) TESTS 5 0 307200
244194075 LCYang A Jan. 31, 2024, 3:09 a.m. OK GNU C++17 (64) TESTS 5 15 0
244194855 jdurie A Jan. 31, 2024, 3:19 a.m. OK GNU C++17 (64) TESTS 5 15 0
244195992 mio-lover A Jan. 31, 2024, 3:34 a.m. OK GNU C++17 (64) TESTS 5 15 0
244209278 Cilouer A Jan. 31, 2024, 5:56 a.m. OK GNU C++17 (64) TESTS 5 15 0
244196456 chunzhifeng A Jan. 31, 2024, 3:40 a.m. OK GNU C++17 (64) TESTS 5 15 0
244205088 Mag1sk A Jan. 31, 2024, 5:16 a.m. OK GNU C++17 (64) TESTS 5 15 0
244197285 Uhine A Jan. 31, 2024, 3:52 a.m. OK GNU C++17 (64) TESTS 5 15 0
244193049 bright_ml A Jan. 31, 2024, 2:56 a.m. OK GNU C++17 (64) TESTS 5 15 0
244209179 lcf12345 A Jan. 31, 2024, 5:55 a.m. OK GNU C++20 (64) TESTS 5 0 0
244208496 ringku_ A Jan. 31, 2024, 5:48 a.m. OK GNU C++20 (64) TESTS 5 0 0
244207892 kshqsz A Jan. 31, 2024, 5:43 a.m. OK GNU C++20 (64) TESTS 5 0 0
244204223 Kamikaze_007 A Jan. 31, 2024, 5:07 a.m. OK GNU C++20 (64) TESTS 5 0 0
244204201 Lu_Kai A Jan. 31, 2024, 5:06 a.m. OK GNU C++20 (64) TESTS 5 0 0
244203502 El-Metador A Jan. 31, 2024, 4:59 a.m. OK GNU C++20 (64) TESTS 5 0 0
244201158 TempBahy A Jan. 31, 2024, 4:44 a.m. OK GNU C++20 (64) TESTS 5 0 0
244200652 Sumitp007 A Jan. 31, 2024, 4:37 a.m. OK GNU C++20 (64) TESTS 5 0 0
244200609 snesh101 A Jan. 31, 2024, 4:36 a.m. OK GNU C++20 (64) TESTS 5 0 0
244200576 AH_Tonmoy A Jan. 31, 2024, 4:36 a.m. OK GNU C++20 (64) TESTS 5 0 0
244191822 SadFriedRice A Jan. 31, 2024, 2:38 a.m. OK Go TESTS 5 15 307200
244153978 botayhard A Jan. 30, 2024, 6:17 p.m. OK Go TESTS 5 15 4915200
244201523 java_noob69 A Jan. 31, 2024, 4:48 a.m. OK Java 21 TESTS 5 249 15564800
244154311 newborn_23 A Jan. 30, 2024, 6:18 p.m. OK Java 21 TESTS 5 264 0
244188647 paper A Jan. 31, 2024, 1:49 a.m. OK Java 21 TESTS 5 280 41369600
244200274 _ShenHua_ A Jan. 31, 2024, 4:32 a.m. OK Java 21 TESTS 5 311 0
244195956 rohith_g30 A Jan. 31, 2024, 3:33 a.m. OK Java 21 TESTS 5 311 409600
244184854 goalboy A Jan. 31, 2024, 12:34 a.m. OK Java 21 TESTS 5 312 409600
244160992 aryanraj1622 A Jan. 30, 2024, 6:53 p.m. OK Java 21 TESTS 5 342 409600
244205591 rajneesh.osho A Jan. 31, 2024, 5:21 a.m. OK Java 21 TESTS 5 343 512000
244135644 is_this_greedy A Jan. 30, 2024, 4:21 p.m. OK Java 21 TESTS 5 358 0
244203149 sachin_swain A Jan. 31, 2024, 4:55 a.m. OK Java 21 TESTS 5 358 409600
244135458 lyongwolf A Jan. 30, 2024, 4:20 p.m. OK Java 8 TESTS 5 124 0
244207034 Required A Jan. 31, 2024, 5:36 a.m. OK Java 8 TESTS 5 156 0
244203794 naitikvarshney A Jan. 31, 2024, 5:02 a.m. OK Java 8 TESTS 5 171 0
244199340 coderman2004 A Jan. 31, 2024, 4:19 a.m. OK Java 8 TESTS 5 187 0
244209168 man0j A Jan. 31, 2024, 5:55 a.m. OK Java 8 TESTS 5 202 0
244158418 Sumitsingh7 A Jan. 30, 2024, 6:37 p.m. OK Java 8 TESTS 5 202 5939200
244190448 breeze A Jan. 31, 2024, 2:17 a.m. OK Java 8 TESTS 5 218 0
244192546 Aarize123 A Jan. 31, 2024, 2:49 a.m. OK Java 8 TESTS 5 218 0
244188413 qazaha A Jan. 31, 2024, 1:45 a.m. OK Java 8 TESTS 5 218 0
244183694 srinjanadeb A Jan. 31, 2024, 12:07 a.m. OK Java 8 TESTS 5 218 0
244144486 mircea85 A Jan. 30, 2024, 4:43 p.m. OK Mono C# TESTS 5 46 1945600
244177810 abhinav13112005 A Jan. 30, 2024, 9:51 p.m. OK MS C++ 2017 TESTS 5 46 0
244163880 gullu42 A Jan. 30, 2024, 7:15 p.m. OK MS C++ 2017 TESTS 5 61 0
244205050 bitak1f A Jan. 31, 2024, 5:15 a.m. OK MS C++ 2017 TESTS 5 61 0
244137062 nbao_12 A Jan. 30, 2024, 4:24 p.m. OK MS C++ 2017 TESTS 5 62 102400
244135328 IMmortal_z A Jan. 30, 2024, 4:20 p.m. OK MS C++ 2017 TESTS 5 77 0
244164713 DmacOP A Jan. 30, 2024, 7:22 p.m. OK MS C++ 2017 TESTS 5 77 0
244136754 Garnacho A Jan. 30, 2024, 4:24 p.m. OK PascalABC.NET TESTS 5 358 0
244155429 Roll_Num_44 A Jan. 30, 2024, 6:22 p.m. OK PyPy 2 TESTS 5 218 1024000
244183035 plevande A Jan. 30, 2024, 11:52 p.m. OK PyPy 3 TESTS 5 124 4505600
244189711 nealzane A Jan. 31, 2024, 2:06 a.m. OK PyPy 3 TESTS 5 202 6758400
244175194 momenelmesady4803 A Jan. 30, 2024, 9:12 p.m. OK PyPy 3 TESTS 5 249 5529600
244165906 niyander A Jan. 30, 2024, 7:32 p.m. OK PyPy 3 TESTS 5 264 5529600
244172589 4rn4vg A Jan. 30, 2024, 8:39 p.m. OK PyPy 3 TESTS 5 280 5120000
244185751 Victor_Luis123 A Jan. 31, 2024, 12:52 a.m. OK PyPy 3 TESTS 5 280 5324800
244134686 2110030214_e A Jan. 30, 2024, 4:18 p.m. OK PyPy 3 TESTS 5 311 5427200
244154705 Rache_Bartmoss A Jan. 30, 2024, 6:19 p.m. OK PyPy 3-64 TESTS 5 77 2662400
244162163 the_last_smilodon A Jan. 30, 2024, 7:02 p.m. OK PyPy 3-64 TESTS 5 77 2764800
244174036 gardengnome A Jan. 30, 2024, 8:57 p.m. OK PyPy 3-64 TESTS 5 77 2969600
244161186 Tinky1224 A Jan. 30, 2024, 6:55 p.m. OK PyPy 3-64 TESTS 5 77 5734400
244178211 MenaceJn A Jan. 30, 2024, 9:58 p.m. OK PyPy 3-64 TESTS 5 77 6553600
244179785 McPqndq A Jan. 30, 2024, 10:32 p.m. OK PyPy 3-64 TESTS 5 78 5427200
244162279 the_last_smilodon A Jan. 30, 2024, 7:03 p.m. OK PyPy 3-64 TESTS 5 93 2764800
244176356 randombernie A Jan. 30, 2024, 9:29 p.m. OK PyPy 3-64 TESTS 5 93 4300800
244181228 amongsus A Jan. 30, 2024, 11:06 p.m. OK PyPy 3-64 TESTS 5 93 4608000
244197415 mikeac A Jan. 31, 2024, 3:54 a.m. OK PyPy 3-64 TESTS 5 93 5324800
244195730 muralisurla23 A Jan. 31, 2024, 3:30 a.m. OK Python 3 TESTS 5 61 512000
244172405 snowball_ice_cream A Jan. 30, 2024, 8:37 p.m. OK Python 3 TESTS 5 61 921600
244198972 arunshankar1221 A Jan. 31, 2024, 4:14 a.m. OK Python 3 TESTS 5 62 819200
244204498 htilalivada A Jan. 31, 2024, 5:10 a.m. OK Python 3 TESTS 5 77 102400
244143798 minhbao502 A Jan. 30, 2024, 4:42 p.m. OK Python 3 TESTS 5 77 1331200
244201206 wyf0722 A Jan. 31, 2024, 4:44 a.m. OK Python 3 TESTS 5 77 1843200
244190787 TejasBharadwaj A Jan. 31, 2024, 2:22 a.m. OK Python 3 TESTS 5 78 1228800
244209441 ayush_jhajharia A Jan. 31, 2024, 5:57 a.m. OK Python 3 TESTS 5 93 102400
244207070 AI_ A Jan. 31, 2024, 5:36 a.m. OK Python 3 TESTS 5 93 102400
244203380 zolars A Jan. 31, 2024, 4:58 a.m. OK Python 3 TESTS 5 93 102400

remove filters

Back to search problems