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 126631499 Nov. 12, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 156 ) F Neural Network Problem PROGRAMMING *special binary search greedy

B"You want to train a neural network model for your graduation work. There are n images in the dataset, the i -th image's size is a_i bytes. You don't have any powerful remote servers to train this model so you have to do it on your local machine. But there is a problem: the total size of the dataset is too big for your machine, so you decided to remove some images -- though you don't want to make the dataset too weak so you can remove no more than k images from it. Note that you can only remove images, you can't change their order. You want to remove these images optimally so you came up with a metric (you're a data scientist after all) that allows to measure the result of removals. Consider the array b_1, b_2, ldots, b_m after removing at most k images ( n - k <= m <= n ). The data from this array will be uploaded to the machine in blocks of x consecutive elements each. More precisely: There will be cnt = <= ft lceil frac{m}{x} right rceil blocks in total. Note that if m is not divisible by x then the last block contains less than x elements, and it's okay. Let w(i) be the total size of the i -th block -- that is, the sum of sizes of images inside this block. For example, the size of the first block w(1) is b_1 + b_2 + ldots + b_x , the size of the second block w(2) is b_{x + 1} + b_{x + 2} + ldots + b_{2x} . The value of the metric you came up with is the maximum block size over the blocks of the resulting dataset. In other words, the value of the metric is max limits_{i=1}^{cnt} w(i) . You don't want to overload your machine too much, so you have to remove at most k images in a way that minimizes the value of the metric described above. The first line of the input contains three integers n , k and x ( 1 <= n <= 10^5 ; 1 <= k, x <= n ) -- the number of images in the dataset, the maximum number of images yo"...

Tutorials

84563

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
98216859 Spheniscine F Nov. 12, 2020, 4 p.m. OK Kotlin TESTS 73 311 0
98219360 AryssonFigueiredo F Nov. 12, 2020, 4:32 p.m. OK Kotlin TESTS 73 421 0
98213731 Golovanov399 F Nov. 12, 2020, 3:26 p.m. OK Kotlin TESTS 73 764 3276800
98213318 eatmore F Nov. 12, 2020, 3:21 p.m. OK Kotlin TESTS 73 826 0
98227675 Anish1712 F Nov. 12, 2020, 6:44 p.m. OK Kotlin TESTS 73 841 3584000
98213485 SYury F Nov. 12, 2020, 3:23 p.m. OK Kotlin TESTS 73 842 3686400
98214208 uwi F Nov. 12, 2020, 3:30 p.m. OK Kotlin TESTS 73 842 4710400
98215008 vstrimaitis F Nov. 12, 2020, 3:39 p.m. OK Kotlin TESTS 73 857 4608000
98216399 pashka F Nov. 12, 2020, 3:54 p.m. OK Kotlin TESTS 73 873 3584000
98212389 Benq F Nov. 12, 2020, 3:12 p.m. OK Kotlin TESTS 73 873 3686400

remove filters

Back to search problems