Kotlin Heroes 5: ICPC Round

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
1431 Kotlin Heroes 5: ICPC Round FINISHED False 9000 132074663 Nov. 12, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 67 ) H Rogue-like Game PROGRAMMING *special brute force greedy

B'Marina plays a new rogue-like game. In this game, there are n different character species and m different classes. The game is played in runs; for each run, Marina has to select a species and a class for her character. If she selects the i -th species and the j -th class, she will get c_{i, j} points for this run. Initially, some species and classes are unlocked, all others are locked. To unlock the i -th species, Marina has to get at least a_i points in total for previous runs -- that is, as soon as her total score for played runs is at least a_i , this species is unlocked. Similarly, to unlock the j -th class, she has to get at least b_j points in total for previous runs. If a_i = 0 for some i , then this species is unlocked initially (the same applies to classes with b_j = 0 ). Marina wants to unlock all species and classes in the minimum number of runs. Before playing the game, she can read exactly one guide on some combination of species and class, and reading a guide will increase the score she gets for all runs with that combination by k (formally, before playing the game, she can increase exactly one value of c_{i, j} by k ). What is the minimum number of runs she has to play to unlock all species and classes if she chooses the combination to read a guide on optimally? The first line contains three integers n , m and k ( 1 <= n, m <= 1500 ; 0 <= k <= 10^9 ). The second line contains n integers a_1 , a_2 , ..., a_n ( 0 = a_1 <= a_2 <= ... <= a_n <= 10^{12} ), where a_i is the number of points required to unlock the i -th species (or 0 , if it is unlocked initially). Note that a_1 = 0 , and these values are non-descending. The third line contains m integers b_1 , b_2 , ..., b_m ( 0 = b_1 <= b_2 <= ... <= b_m <= 10^{12} ), where b_i is the numbe'...

Tutorials

84563

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
98215093 eatmore H Nov. 12, 2020, 3:40 p.m. OK Kotlin TESTS 71 623 18329600
98213988 Geothermal H Nov. 12, 2020, 3:28 p.m. OK Kotlin TESTS 71 654 30310400
98229507 IgorSmirnov H Nov. 12, 2020, 7:25 p.m. OK Kotlin TESTS 71 779 19251200
98226771 lightseba H Nov. 12, 2020, 6:26 p.m. OK Kotlin TESTS 71 779 43520000
98214609 Benq H Nov. 12, 2020, 3:35 p.m. OK Kotlin TESTS 71 904 28979200
98214115 xiaowuc1 H Nov. 12, 2020, 3:29 p.m. OK Kotlin TESTS 71 1060 5939200
98221433 jonas.havelka.42 H Nov. 12, 2020, 4:58 p.m. OK Kotlin TESTS 71 1076 163123200
98229643 timf1089 H Nov. 12, 2020, 7:28 p.m. OK Kotlin TESTS 71 1170 0
98239433 tabr H Nov. 13, 2020, 1:50 a.m. OK Kotlin TESTS 71 1185 30720000
98233367 gleb.astashkin H Nov. 12, 2020, 9:12 p.m. OK Kotlin TESTS 71 1216 31539200

remove filters

Back to search problems