Codeforces Round 930 (Div. 1)

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
1936 Codeforces Round 930 (Div. 1) FINISHED False 7200 22605899 Feb. 29, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1336 ) C Pokémon Arena PROGRAMMING data structures graphs shortest paths

B"You are at a dueling arena. You also possess n Pok xc3 xa9mons. Initially, only the 1 -st Pok xc3 xa9mon is standing in the arena. Each Pok xc3 xa9mon has m attributes. The j -th attribute of the i -th Pok xc3 xa9mon is a_{i,j} . Each Pok xc3 xa9mon also has a cost to be hired: the i -th Pok xc3 xa9mon's cost is c_i . You want to have the n -th Pok xc3 xa9mon stand in the arena. To do that, you can perform the following two types of operations any number of times in any order: Find the minimum cost you need to pay to have the n -th Pok xc3 xa9mon stand in the arena. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^5 ). The description of the test cases follows. The first line of each test case contains two integers n and m ( 2 <= n <= 4 cdot 10^5 , 1 <= m <= 2 cdot 10^5 , 2 <= q n cdot m <= q 4 cdot 10^5 ). The second line of each test case contains n integers c_1, c_2, ldots, c_n ( 1 <= c_i <= 10^9 ). The i -th of the following n lines contains m integers a_{i,1}, a_{i,2}, ldots, a_{i,m} ( 1 <= a_{i,j} <= 10^9 ). It is guaranteed that the sum of n cdot m over all test cases does not exceed 4 cdot 10^5 . For each test case, output the minimum cost to make the n -th Pok xc3 xa9mon stand in the arena. In the first test case, the attribute array of the 1 -st Pok xc3 xa9mon (which is standing in the arena initially) is [2,9,9] . In the first operation, you can choose i=3 , j=1 , k=1 , and increase a_{3,1} by 1 permanently. Now the attribute array of the 3 -rd Pok xc3 xa9mon is [2,2,1] . The cost of this operation is k = 1 . In the second operation, you can choose i=3 , j=1 , and hire the 3 -rd Pok xc3 xa9mon to duel with the current Pok xc3 xa9mon in the arena based on the 1 -st attribute. Since a_{i,j}=a_{3,1}=2 ge 2=a_{1,1} , the 3 -r"...

Tutorials

Codeforces Round 930 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
248951998 Muelsyse C Feb. 29, 2024, 3:56 p.m. OK GNU C++17 TESTS 29 233 42496000
248983477 -14 C Feb. 29, 2024, 6:51 p.m. OK GNU C++17 TESTS 29 265 23859200
248986585 HHY_zZhu C Feb. 29, 2024, 7:09 p.m. OK GNU C++17 TESTS 29 280 24166400
248983571 -14 C Feb. 29, 2024, 6:51 p.m. OK GNU C++17 TESTS 29 280 24166400
249002561 Diana773 C Feb. 29, 2024, 10:08 p.m. OK GNU C++17 TESTS 29 342 61337600
249002133 Diana773 C Feb. 29, 2024, 9:59 p.m. OK GNU C++17 TESTS 29 358 66969600
248969062 fast_photon C Feb. 29, 2024, 4:29 p.m. OK GNU C++17 TESTS 29 358 182988800
249032913 zc2707 C March 1, 2024, 5:59 a.m. OK GNU C++17 TESTS 30 373 72806400
248991719 Sugar_fan C Feb. 29, 2024, 7:49 p.m. OK GNU C++17 TESTS 29 374 19456000
248946276 eunlin C Feb. 29, 2024, 3:45 p.m. OK GNU C++17 TESTS 29 374 53964800
248971748 ImmortaLimit C Feb. 29, 2024, 4:34 p.m. OK GNU C++17 (64) TESTS 29 171 324403200
248934009 chinerist C Feb. 29, 2024, 3:22 p.m. OK GNU C++17 (64) TESTS 29 217 32051200
248966375 Lawali C Feb. 29, 2024, 4:24 p.m. OK GNU C++17 (64) TESTS 29 233 45056000
248959331 kdh9949 C Feb. 29, 2024, 4:10 p.m. OK GNU C++17 (64) TESTS 29 249 29900800
248940037 Rubikun C Feb. 29, 2024, 3:33 p.m. OK GNU C++17 (64) TESTS 29 264 61030400
248981950 honey C Feb. 29, 2024, 6:43 p.m. OK GNU C++17 (64) TESTS 29 280 73216000
249010144 xuanxuan001 C March 1, 2024, 12:50 a.m. OK GNU C++17 (64) TESTS 30 280 82022400
248936633 hitonanode C Feb. 29, 2024, 3:27 p.m. OK GNU C++17 (64) TESTS 29 327 91443200
248955694 Celebrate C Feb. 29, 2024, 4:03 p.m. OK GNU C++17 (64) TESTS 29 327 111923200
249019811 Osama_Alkhodairy C March 1, 2024, 3:36 a.m. OK GNU C++17 (64) TESTS 30 342 71372800
248989382 Sugar_fan C Feb. 29, 2024, 7:29 p.m. OK GNU C++20 (64) TESTS 29 140 24064000
249016806 _andyli C March 1, 2024, 2:50 a.m. OK GNU C++20 (64) TESTS 30 140 78950400
248955418 magnus.hegdahl C Feb. 29, 2024, 4:02 p.m. OK GNU C++20 (64) TESTS 29 155 11571200
248991564 Sugar_fan C Feb. 29, 2024, 7:48 p.m. OK GNU C++20 (64) TESTS 29 156 24064000
248991499 Sugar_fan C Feb. 29, 2024, 7:47 p.m. OK GNU C++20 (64) TESTS 29 156 24064000
248988360 Sugar_fan C Feb. 29, 2024, 7:22 p.m. OK GNU C++20 (64) TESTS 29 156 25702400
249021119 _andyli C March 1, 2024, 3:53 a.m. OK GNU C++20 (64) TESTS 30 170 78950400
248988420 Sugar_fan C Feb. 29, 2024, 7:22 p.m. OK GNU C++20 (64) TESTS 29 171 24064000
248989916 Sugar_fan C Feb. 29, 2024, 7:33 p.m. OK GNU C++20 (64) TESTS 29 171 25702400
248988589 Sugar_fan C Feb. 29, 2024, 7:23 p.m. OK GNU C++20 (64) TESTS 29 171 25702400
248942954 arvindf232 C Feb. 29, 2024, 3:38 p.m. OK Kotlin 1.9 TESTS 29 452 140697600
248966653 misorin C Feb. 29, 2024, 4:25 p.m. OK PyPy 3-64 TESTS 29 826 101580800
249009984 hxu10 C March 1, 2024, 12:46 a.m. OK PyPy 3-64 TESTS 30 1809 240025600
249009867 hxu10 C March 1, 2024, 12:44 a.m. OK PyPy 3-64 TESTS 30 1965 234803200
248956966 dyppp C Feb. 29, 2024, 4:05 p.m. OK PyPy 3-64 TESTS 29 2620 323686400
248929050 Egor C Feb. 29, 2024, 3:13 p.m. OK Rust 2021 TESTS 29 311 144384000

remove filters

Back to search problems