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 |
---|---|---|---|---|---|---|
730 | 2016-2017 ACM-ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 260316023 | Oct. 23, 2016, 8 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 91 ) | F | Ber Patio | PROGRAMMING | 3200 |
B'Polycarp is a regular customer at the restaurant "Ber Patio". He likes having lunches there. "Ber Patio" has special discount program for regular customers. A customer can collect bonuses and partially cover expenses in the restaurant. Let 's assume a customer currently has b bonuses and she has to pay r burles for a lunch. In this case the customer can use bonuses (1 bonus = 1 burle) to reduce the payment. She can cover at most half of the payment using bonuses. However, 1 bonus will be added to the customer 's bonus balance per each 10 burles she paid. Formally: Initially, there are b bonuses on Polycarp 's account. Polycarp is going to have a lunch in "Ber Patio" for the next n days. He estimated the values a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an, where ai is the number of burles in a receipt for the i-th day. The sum over all receipts doesn 't exceed 105 burles. Write a program to find the minimum number of burles Polycarp has to spend and an optimal strategy to use bonuses. The first line contains two integer numbers n and b (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- number of days and initial number of bonuses Polycarp has. The second line contains the integer sequence a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000), where ai is the amount of burles in the i-th day 's receipt. It is guaranteed that the sum of all receipts does not exceed 105 burles. On the first line, print the expected minimal number of burles to pay for all n receipts. On the second line, print the sequence of integer numbers b1, xe2 x80 x89b2, xe2 x80 x89..., xe2 x80 x89bn, where bi is the number of bonuses to use on the i-th day. If there are multiple solutions, print any of them. '... |
Разбор задач (видео, по-русски) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
22222294 | aufeas | F | Nov. 15, 2016, 12:37 p.m. | OK | GNU C++ | TESTS | 228 | 30 | 0 | 3200 | |
21765958 | lucyanna2018 | F | Oct. 25, 2016, 7:54 a.m. | OK | GNU C++ | TESTS | 228 | 31 | 307200 | 3200 | |
40983335 | ReaLNero1 | F | July 30, 2018, 6:49 p.m. | OK | GNU C++ | TESTS | 228 | 46 | 0 | 3200 | |
24906268 | Dylans | F | Feb. 23, 2017, 1:05 a.m. | OK | GNU C++ | TESTS | 228 | 280 | 403558400 | 3200 | |
34840007 | _O.O_ | F | Feb. 2, 2018, 1:32 p.m. | OK | GNU C++ | TESTS | 228 | 296 | 203059200 | 3200 | |
26373340 | Iliaplt | F | April 15, 2017, 7:28 a.m. | OK | GNU C++ | TESTS | 228 | 312 | 202752000 | 3200 | |
22223321 | aufeas | F | Nov. 15, 2016, 1:39 p.m. | OK | GNU C++ | TESTS | 228 | 327 | 200601600 | 3200 | |
22206415 | krijgertje | F | Nov. 14, 2016, 11:32 a.m. | OK | GNU C++11 | TESTS | 228 | 31 | 102400 | 3200 | |
21717817 | ielenik | F | Oct. 23, 2016, 5:05 p.m. | OK | GNU C++11 | TESTS | 228 | 31 | 204800 | 3200 | |
22104410 | NiroBC | F | Nov. 8, 2016, 2:45 a.m. | OK | GNU C++11 | TESTS | 228 | 124 | 307200 | 3200 | |
23357814 | Ali.Pi | F | Dec. 27, 2016, 11:18 a.m. | OK | GNU C++11 | TESTS | 228 | 140 | 2355200 | 3200 | |
36748326 | zhouyuyang | F | March 30, 2018, 1:38 p.m. | OK | GNU C++11 | TESTS | 228 | 140 | 3993600 | 3200 | |
57878555 | lopare | F | July 28, 2019, 6:42 a.m. | OK | GNU C++11 | TESTS | 228 | 233 | 200704000 | 3200 | |
57813795 | py_ultron | F | July 26, 2019, 6:40 p.m. | OK | GNU C++11 | TESTS | 228 | 249 | 200704000 | 3200 | |
22047529 | poursoul | F | Nov. 5, 2016, 3:24 a.m. | OK | GNU C++11 | TESTS | 228 | 280 | 100556800 | 3200 | |
21842082 | Claris lych123 poursoul | F | Oct. 28, 2016, 8:37 a.m. | OK | GNU C++11 | TESTS | 228 | 327 | 101580800 | 3200 | |
22014151 | shijieyywd | F | Nov. 3, 2016, 1:52 p.m. | OK | GNU C++11 | TESTS | 228 | 358 | 200806400 | 3200 | |
22010328 | xyz2606 | F | Nov. 3, 2016, 10:26 a.m. | OK | GNU C++14 | TESTS | 228 | 15 | 409600 | 3200 | |
22065786 | Errichto | F | Nov. 5, 2016, 10:51 p.m. | OK | GNU C++14 | TESTS | 228 | 31 | 102400 | 3200 | |
21719686 | viesis | F | Oct. 23, 2016, 6:41 p.m. | OK | GNU C++14 | TESTS | 228 | 31 | 204800 | 3200 | |
21718126 | 1234 | F | Oct. 23, 2016, 5:24 p.m. | OK | GNU C++14 | TESTS | 228 | 31 | 204800 | 3200 | |
38634953 | kut_kjb1994 | F | May 26, 2018, 1:37 p.m. | OK | GNU C++14 | TESTS | 228 | 31 | 307200 | 3200 | |
21820525 | izban enot110 Belonogov | F | Oct. 27, 2016, 11:58 a.m. | OK | GNU C++14 | TESTS | 228 | 108 | 102400 | 3200 | |
68685161 | Cyanic | F | Jan. 13, 2020, 2:47 a.m. | OK | GNU C++14 | TESTS | 228 | 171 | 401715200 | 3200 | |
47017038 | n_dao107 | F | Dec. 14, 2018, 7:45 p.m. | OK | GNU C++14 | TESTS | 228 | 295 | 201011200 | 3200 | |
49101987 | CrankTV | F | Jan. 28, 2019, 11:42 a.m. | OK | GNU C++14 | TESTS | 228 | 295 | 405299200 | 3200 | |
23658527 | rng_57 | F | Jan. 9, 2017, 1:43 a.m. | OK | GNU C++14 | TESTS | 228 | 311 | 202752000 | 3200 | |
69940556 | gongsuidashen | F | Feb. 1, 2020, 5:59 a.m. | OK | GNU C++17 | TESTS | 228 | 46 | 102400 | 3200 | |
50919546 | Hugin | F | March 7, 2019, 8:25 a.m. | OK | GNU C++17 | TESTS | 228 | 265 | 201011200 | 3200 | |
50890822 | Trote_w | F | March 6, 2019, 1:08 p.m. | OK | GNU C++17 | TESTS | 228 | 296 | 200908800 | 3200 | |
21774440 | Carups | F | Oct. 25, 2016, 3:23 p.m. | OK | MS C++ | TESTS | 228 | 233 | 402432000 | 3200 |
Back to search problems