Codeforces Round 933 (Div. 3)

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
1941 Codeforces Round 933 (Div. 3) FINISHED False 8100 27012263 March 11, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10126 ) E Rudolf and k Bridges PROGRAMMING data structures dp

B'Bernard loves visiting Rudolf, but he is always running late. The problem is that Bernard has to cross the river on a ferry. Rudolf decided to help his friend solve this problem. The river is a grid of n rows and m columns. The intersection of the i -th row and the j -th column contains the number a_{i,j} -- the depth in the corresponding cell. All cells in the first and last columns correspond to the river banks, so the depth for them is 0 . Rudolf can choose the row (i,1), (i,2), ldots, (i,m) and build a bridge over it. In each cell of the row, he can install a support for the bridge. The cost of installing a support in the cell (i,j) is a_{i,j}+1 . Supports must be installed so that the following conditions are met: Building just one bridge is boring. Therefore, Rudolf decided to build k bridges on consecutive rows of the river, that is, to choose some i ( 1 <= i <= n - k + 1 ) and independently build a bridge on each of the rows i, i + 1, ldots, i + k - 1 . Help Rudolf minimize the total cost of installing supports. The first line contains a single integer t (1 <= t <= 10^3) -- the number of test cases. The descriptions of the test cases follow. The first line of each test case contains four integers n , m , k , and d ( 1 <= k <= n <= 100 , 3 <= m <= 2 cdot 10^5 , 1 <= d <= m ) -- the number of rows and columns of the field, the number of bridges, and the maximum distance between supports. Then follow n lines, i -th line contains m positive integers a_{i, j} ( 0 <= a_{i, j} <= 10^6 , a_{i, 1} = a_{i, m} = 0 ) -- the depths of the river cells. It is guaranteed that the sum of n cdot m for all sets of input data does not exceed 2 cdot 10^5 . For each test case, output a single number -- the minimum total cost of supports installation. In the first test case, it is most pro'...

Tutorials

127018

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
250883462 Lwh1019 E March 12, 2024, 5:46 a.m. OK C++14 (GCC 6-32) TESTS 18 46 2457600
250858059 lovejsn E March 11, 2024, 11:53 p.m. OK C++14 (GCC 6-32) TESTS 18 62 2457600
250868453 zxl414869369 E March 12, 2024, 2:53 a.m. OK C++14 (GCC 6-32) TESTS 18 62 3174400
250885077 zhuge0 E March 12, 2024, 5:59 a.m. OK C++14 (GCC 6-32) TESTS 18 62 4812800
250867253 longting E March 12, 2024, 2:36 a.m. OK C++14 (GCC 6-32) TESTS 18 62 6451200
250870994 GoymyGo E March 12, 2024, 3:29 a.m. OK C++14 (GCC 6-32) TESTS 18 62 7987200
250869411 Okeah-Atopos E March 12, 2024, 3:07 a.m. OK C++14 (GCC 6-32) TESTS 18 62 27443200
250868058 yuyc E March 12, 2024, 2:47 a.m. OK C++14 (GCC 6-32) TESTS 18 62 252518400
250877161 dragon6tiger2 E March 12, 2024, 4:45 a.m. OK C++14 (GCC 6-32) TESTS 18 77 3174400
250830635 rawalevedant E March 11, 2024, 6:28 p.m. OK C++14 (GCC 6-32) TESTS 18 77 3174400
250829803 Kacchi E March 11, 2024, 6:21 p.m. OK C++17 (GCC 7-32) TESTS 18 46 819200
250828171 Blaze_Sharp E March 11, 2024, 6:09 p.m. OK C++17 (GCC 7-32) TESTS 18 46 819200
250865547 qiao_bo_shi E March 12, 2024, 2:09 a.m. OK C++17 (GCC 7-32) TESTS 18 46 3379200
250883654 zhaoyun E March 12, 2024, 5:47 a.m. OK C++17 (GCC 7-32) TESTS 18 46 258867200
250872980 gebeng E March 12, 2024, 3:53 a.m. OK C++17 (GCC 7-32) TESTS 18 61 204800
250837606 rHermes E March 11, 2024, 7:28 p.m. OK C++17 (GCC 7-32) TESTS 18 61 1638400
250871120 de_hong E March 12, 2024, 3:30 a.m. OK C++17 (GCC 7-32) TESTS 18 61 3174400
250867969 shenchuan_fan E March 12, 2024, 2:46 a.m. OK C++17 (GCC 7-32) TESTS 18 61 3174400
250852017 karansrivastava E March 11, 2024, 10 p.m. OK C++17 (GCC 7-32) TESTS 18 61 3584000
250835310 theancientdevil E March 11, 2024, 7:07 p.m. OK C++17 (GCC 7-32) TESTS 18 61 3993600
250832314 nguyenquocthao00 E March 11, 2024, 6:41 p.m. OK Go TESTS 18 61 11571200
250821684 Rememorio E March 11, 2024, 5:27 p.m. OK Go TESTS 18 93 7884800
250846781 lakshaycode22 E March 11, 2024, 8:56 p.m. OK Java 21 TESTS 18 295 204800
250880738 Jagnath_Reddy E March 12, 2024, 5:24 a.m. OK Java 21 TESTS 18 311 7577600
250852371 Utsav82 E March 11, 2024, 10:06 p.m. OK Java 21 TESTS 18 326 8908800
250863744 Zhanzhe_Lee E March 12, 2024, 1:36 a.m. OK Java 21 TESTS 18 327 2252800
250830155 1isGreaterThan0 E March 11, 2024, 6:24 p.m. OK Java 21 TESTS 18 342 0
250874252 Multi-Thread E March 12, 2024, 4:09 a.m. OK Java 21 TESTS 18 342 204800
250840180 krish0596 E March 11, 2024, 7:53 p.m. OK Java 21 TESTS 18 342 4812800
250838812 krish0596 E March 11, 2024, 7:40 p.m. OK Java 21 TESTS 18 342 5017600
250880631 _ShenHua_ E March 12, 2024, 5:23 a.m. OK Java 21 TESTS 18 358 614400
250875723 himneesh9 E March 12, 2024, 4:27 a.m. OK Java 21 TESTS 18 358 7782400
250822520 NerfThis E March 11, 2024, 5:32 p.m. OK Java 8 TESTS 18 140 2764800
250863824 Yousef_Badr E March 12, 2024, 1:37 a.m. OK Java 8 TESTS 18 187 2764800
250864202 Yousef_Badr E March 12, 2024, 1:45 a.m. OK Java 8 TESTS 18 187 6246400
250882047 Jay08 E March 12, 2024, 5:35 a.m. OK Java 8 TESTS 18 202 71372800
250844659 tiwariabhishek E March 11, 2024, 8:34 p.m. OK Java 8 TESTS 18 280 3481600
250874518 2100031465 E March 12, 2024, 4:12 a.m. OK Java 8 TESTS 18 343 0
250871716 Yousef_Badr E March 12, 2024, 3:37 a.m. OK Java 8 TESTS 18 343 6553600
250832258 samy10127 E March 11, 2024, 6:40 p.m. OK Java 8 TESTS 18 389 0
250823808 kunal_0199 E March 11, 2024, 5:39 p.m. OK Java 8 TESTS 18 529 4812800
250858393 hiryuN E March 12, 2024, midnight OK PyPy 3 TESTS 18 919 28467200
250845275 gardengnome E March 11, 2024, 8:41 p.m. OK PyPy 3-64 TESTS 18 171 26828800
250871281 helltractor E March 12, 2024, 3:32 a.m. OK PyPy 3-64 TESTS 18 186 27443200
250872759 D_coder22 E March 12, 2024, 3:50 a.m. OK PyPy 3-64 TESTS 18 187 21094400
250871719 Admiring_ShockleyZns E March 12, 2024, 3:37 a.m. OK PyPy 3-64 TESTS 18 202 29900800
250857525 cybsbbb E March 11, 2024, 11:42 p.m. OK PyPy 3-64 TESTS 18 249 22118400
250833640 YT_Antonio_Codes E March 11, 2024, 6:52 p.m. OK PyPy 3-64 TESTS 18 327 30720000
250849606 kibr E March 11, 2024, 9:28 p.m. OK PyPy 3-64 TESTS 18 342 24371200
250847678 ser0p E March 11, 2024, 9:06 p.m. OK PyPy 3-64 TESTS 18 342 26009600
250850206 kibr E March 11, 2024, 9:35 p.m. OK PyPy 3-64 TESTS 18 343 24678400
250828699 tan36 E March 11, 2024, 6:14 p.m. OK PyPy 3-64 TESTS 18 343 26828800
250823327 OLOGY E March 11, 2024, 5:37 p.m. OK Python 2 TESTS 18 234 12697600
250822398 OLOGY E March 11, 2024, 5:31 p.m. OK Python 2 TESTS 18 249 12697600
250874949 xcd_ E March 12, 2024, 4:17 a.m. OK Python 3 TESTS 18 187 27545600
250830972 dupemaster E March 11, 2024, 6:30 p.m. OK Python 3 TESTS 18 202 27033600
250874039 jinyiqi E March 12, 2024, 4:06 a.m. OK Python 3 TESTS 18 265 27545600
250827200 mohaiminul_islam E March 11, 2024, 6:02 p.m. OK Python 3 TESTS 18 311 38400000
250845716 billythebishop4 E March 11, 2024, 8:45 p.m. OK Python 3 TESTS 18 327 40038400
250827370 tomoe_ry E March 11, 2024, 6:04 p.m. OK Python 3 TESTS 18 1700 31232000

remove filters

Back to search problems