2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred)

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
1070 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred) FINISHED False 18000 197502923 Oct. 20, 2018, 8:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4959 ) D Garbage Disposal PROGRAMMING greedy 1400

B"Enough is enough. Too many times it happened that Vasya forgot to dispose of garbage and his apartment stank afterwards. Now he wants to create a garbage disposal plan and stick to it. For each of next n days Vasya knows a_i -- number of units of garbage he will produce on the i -th day. Each unit of garbage must be disposed of either on the day it was produced or on the next day. Vasya disposes of garbage by putting it inside a bag and dropping the bag into a garbage container. Each bag can contain up to k units of garbage. It is allowed to compose and drop multiple bags into a garbage container in a single day. Being economical, Vasya wants to use as few bags as possible. You are to compute the minimum number of bags Vasya needs to dispose of all of his garbage for the given n days. No garbage should be left after the n -th day. The first line of the input contains two integers n and k ( 1 <= n <= 2 cdot10^5, 1 <= k <= 10^9 ) -- number of days to consider and bag's capacity. The second line contains n space separated integers a_i ( 0 <= a_i <= 10^9 ) -- the number of units of garbage produced on the i -th day. Output a single integer -- the minimum number of bags Vasya needs to dispose of all garbage. Each unit of garbage should be disposed on the day it was produced or on the next day. No garbage can be left after the n -th day. In a day it is allowed to compose and drop multiple bags. "...

Tutorials

Solution to problem M. Algoland and Berland of 2018-2019 ICPC, NEERC

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
44577611 D Oct. 20, 2018, 7:33 a.m. OK Unknown TESTS 0 0 0 1400
44577523 D Oct. 20, 2018, 7:33 a.m. OK Unknown TESTS 0 0 0 1400
44577500 D Oct. 20, 2018, 7:33 a.m. OK Unknown TESTS 0 0 0 1400
44577407 D Oct. 20, 2018, 7:33 a.m. OK Unknown TESTS 0 0 0 1400
44577375 D Oct. 20, 2018, 7:33 a.m. OK Unknown TESTS 0 0 0 1400
44577373 D Oct. 20, 2018, 7:33 a.m. OK Unknown TESTS 0 0 0 1400
44577370 D Oct. 20, 2018, 7:33 a.m. OK Unknown TESTS 0 0 0 1400
44577360 D Oct. 20, 2018, 7:33 a.m. OK Unknown TESTS 0 0 0 1400
44577352 D Oct. 20, 2018, 7:33 a.m. OK Unknown TESTS 0 0 0 1400
44577349 D Oct. 20, 2018, 7:33 a.m. OK Unknown TESTS 0 0 0 1400

remove filters

Back to search problems