Codeforces Round 552 (Div. 3)

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
1154 Codeforces Round 552 (Div. 3) FINISHED False 7200 176397899 April 16, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2864 ) F Shovels Shop PROGRAMMING dp greedy sortings 2300

B'There are n shovels in the nearby shop. The i -th shovel costs a_i bourles. Misha has to buy exactly k shovels. Each shovel can be bought no more than once. Misha can buy shovels by several purchases. During one purchase he can choose any subset of remaining (non-bought) shovels and buy this subset. There are also m special offers in the shop. The j -th of them is given as a pair (x_j, y_j) , and it means that if Misha buys exactly x_j shovels during one purchase then y_j most cheapest of them are for free (i.e. he will not pay for y_j most cheapest shovels during the current purchase). Misha can use any offer any (possibly, zero) number of times, but he cannot use more than one offer during one purchase (but he can buy shovels without using any offers). Your task is to calculate the minimum cost of buying k shovels, if Misha buys them optimally. The first line of the input contains three integers n, m and k ( 1 <= n, m <= 2 cdot 10^5, 1 <= k <= min(n, 2000) ) -- the number of shovels in the shop, the number of special offers and the number of shovels Misha has to buy, correspondingly. The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 2 cdot 10^5 ), where a_i is the cost of the i -th shovel. The next m lines contain special offers. The j -th of them is given as a pair of integers (x_i, y_i) ( 1 <= y_i <= x_i <= n ) and means that if Misha buys exactly x_i shovels during some purchase, then he can take y_i most cheapest of them for free. Print one integer -- the minimum cost of buying k shovels if Misha buys them optimally. In the first example Misha can buy shovels on positions 1 and 4 (both with costs 2 ) during the first purchase and get one of them for free using the first or the third special offer. And then he can buy shovels on positions 3 '...

Tutorials

Codeforces Round #552 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52932521 iica F April 18, 2019, 3:42 a.m. OK D TESTS 76 389 22528000 2300
53380867 fluffyowl F April 26, 2019, 10:29 p.m. OK D TESTS 76 1794 22425600 2300
57353202 sansen F July 20, 2019, 4:58 a.m. OK GNU C11 TESTS 76 93 1638400 2300
53709636 rainboy F May 3, 2019, 2:55 p.m. OK GNU C11 TESTS 76 140 819200 2300
53112207 GuguMelon F April 22, 2019, 4:34 a.m. OK GNU C++11 TESTS 76 61 3276800 2300
52945418 kirainmoe F April 18, 2019, 11:20 a.m. OK GNU C++11 TESTS 76 61 3993600 2300
55518594 AyoAyowei F June 13, 2019, 7:05 a.m. OK GNU C++11 TESTS 76 62 819200 2300
52999089 undesirable_number1 F April 19, 2019, 6:05 a.m. OK GNU C++11 TESTS 76 62 921600 2300
54220165 Karnage F May 16, 2019, 2:43 a.m. OK GNU C++11 TESTS 76 62 1433600 2300
55753729 Frame233 F June 19, 2019, 2:11 p.m. OK GNU C++11 TESTS 76 62 1433600 2300
64181008 _violet F Nov. 4, 2019, 12:36 a.m. OK GNU C++11 TESTS 76 62 1638400 2300
53096806 lyzqs F April 21, 2019, 1:59 p.m. OK GNU C++11 TESTS 76 62 2457600 2300
53153300 Sai_0511 F April 22, 2019, 4 p.m. OK GNU C++11 TESTS 76 62 2457600 2300
64141437 Rivaille_Ackerman F Nov. 3, 2019, 8:39 a.m. OK GNU C++11 TESTS 76 62 3174400 2300
55611061 ReaLNero1 F June 16, 2019, 5:45 a.m. OK GNU C++14 TESTS 76 61 7475200 2300
52951891 zjB_shadow F April 18, 2019, 12:14 p.m. OK GNU C++14 TESTS 76 61 17715200 2300
57993827 Acker_man F July 30, 2019, 2:16 p.m. OK GNU C++14 TESTS 76 124 3174400 2300
52957008 JoaquinManuel F April 18, 2019, 2:06 p.m. OK GNU C++14 TESTS 76 140 819200 2300
53687579 Jasmine23 F May 3, 2019, 2:17 a.m. OK GNU C++14 TESTS 76 140 28057600 2300
53881652 senthil28 F May 8, 2019, 3:08 p.m. OK GNU C++14 TESTS 76 155 819200 2300
52932146 JooooooooooDdae F April 18, 2019, 3:21 a.m. OK GNU C++14 TESTS 76 155 819200 2300
52936195 JHSeng F April 18, 2019, 6:35 a.m. OK GNU C++14 TESTS 76 155 921600 2300
61298001 Stephan F Sept. 26, 2019, 2:57 a.m. OK GNU C++14 TESTS 76 155 921600 2300
52954687 WileE.Coyote F April 18, 2019, 1:18 p.m. OK GNU C++14 TESTS 76 155 1638400 2300
52984873 neal F April 18, 2019, 6:33 p.m. OK GNU C++17 TESTS 76 46 921600 2300
52984679 neal F April 18, 2019, 6:29 p.m. OK GNU C++17 TESTS 76 62 921600 2300
54005278 RobertLu F May 11, 2019, 7:24 p.m. OK GNU C++17 TESTS 76 124 819200 2300
53108613 newbeginBKB F April 21, 2019, 10:47 p.m. OK GNU C++17 TESTS 76 124 2457600 2300
53032698 eyesofgod123 F April 20, 2019, 3:05 a.m. OK GNU C++17 TESTS 76 124 3993600 2300
52959869 henu-wxj F April 18, 2019, 3:22 p.m. OK GNU C++17 TESTS 76 139 3174400 2300
55220666 supremeyu F June 6, 2019, 7:21 p.m. OK GNU C++17 TESTS 76 139 5632000 2300
53476554 wjfwjfwjf F April 28, 2019, 3:58 p.m. OK GNU C++17 TESTS 76 140 2355200 2300
60425343 bluefi F Sept. 12, 2019, 7:46 a.m. OK GNU C++17 TESTS 76 140 6553600 2300
53594196 demoJupiter F May 1, 2019, 2:57 a.m. OK GNU C++17 TESTS 76 155 819200 2300
52932773 2008061626 F April 18, 2019, 3:58 a.m. OK Go TESTS 76 452 5222400 2300
52955286 jenish9599 F April 18, 2019, 1:31 p.m. OK Java 8 TESTS 76 171 0 2300
54852137 dyhu083 F May 30, 2019, 5:09 p.m. OK Java 8 TESTS 76 187 0 2300
52919491 esports-always-save F April 17, 2019, 5:12 p.m. OK Java 8 TESTS 76 187 0 2300
53107847 Vishal_dhanani F April 21, 2019, 9:47 p.m. OK Java 8 TESTS 76 202 0 2300
53045902 Andres1 F April 20, 2019, 12:09 p.m. OK Java 8 TESTS 76 202 0 2300
54850876 dyhu083 F May 30, 2019, 4:31 p.m. OK Java 8 TESTS 76 218 0 2300
54850844 dyhu083 F May 30, 2019, 4:30 p.m. OK Java 8 TESTS 76 218 0 2300
54667124 bhautik_77 F May 26, 2019, 2 p.m. OK Java 8 TESTS 76 218 0 2300
54071366 satya26 F May 13, 2019, 4:26 p.m. OK Java 8 TESTS 76 218 0 2300
52998310 martins F April 19, 2019, 5:37 a.m. OK Java 8 TESTS 76 218 2969600 2300
52955150 hongquanntct F April 18, 2019, 1:28 p.m. OK Mono C# TESTS 76 311 28876800 2300
52929692 SantiC F April 18, 2019, 12:15 a.m. OK Mono C# TESTS 76 343 29696000 2300
61253735 vjudge3 F Sept. 25, 2019, 9:17 a.m. OK MS C++ TESTS 76 109 819200 2300
53422046 vjudge1 F April 27, 2019, 11:59 a.m. OK MS C++ TESTS 76 109 2457600 2300
52959800 S.K F April 18, 2019, 3:20 p.m. OK MS C++ TESTS 76 109 3276800 2300
57495591 vjudge3 F July 22, 2019, 8:26 a.m. OK MS C++ TESTS 76 124 3174400 2300
57498442 vjudge5 F July 22, 2019, 9:17 a.m. OK MS C++ TESTS 76 124 3174400 2300
54086377 vjudge4 F May 14, 2019, 7:39 a.m. OK MS C++ TESTS 76 436 2457600 2300
52993719 kou1 F April 19, 2019, 1:39 a.m. OK MS C++ TESTS 76 467 6758400 2300
53414198 vjudge2 F April 27, 2019, 11:30 a.m. OK MS C++ TESTS 76 483 6451200 2300
54019748 vjudge1 F May 12, 2019, 8:59 a.m. OK MS C++ TESTS 76 763 7987200 2300
52936622 SakaRenko F April 18, 2019, 6:50 a.m. OK MS C++ TESTS 76 920 4812800 2300
53164239 CtrlAlt F April 22, 2019, 5:20 p.m. OK MS C++ 2017 TESTS 76 171 819200 2300
55110186 TOXait F June 5, 2019, 5:47 a.m. OK MS C++ 2017 TESTS 76 186 1638400 2300
53026486 AleksanderBalobanov F April 19, 2019, 7:30 p.m. OK MS C++ 2017 TESTS 76 187 3584000 2300
52932256 zcb F April 18, 2019, 3:28 a.m. OK MS C++ 2017 TESTS 76 202 1638400 2300
52930995 2462478392 F April 18, 2019, 2:05 a.m. OK MS C++ 2017 TESTS 76 202 6451200 2300
52931109 2462478392 F April 18, 2019, 2:14 a.m. OK MS C++ 2017 TESTS 76 202 7987200 2300
52944153 petko_mitkov F April 18, 2019, 10:46 a.m. OK MS C++ 2017 TESTS 76 421 5222400 2300
53767371 zhuiyi F May 5, 2019, 1:44 a.m. OK MS C++ 2017 TESTS 76 421 8806400 2300
52929394 moreda F April 17, 2019, 11:52 p.m. OK MS C++ 2017 TESTS 76 483 4812800 2300
68033993 Kirja_ES F Jan. 1, 2020, 10:58 a.m. OK MS C++ 2017 TESTS 76 483 7372800 2300
53676156 gatsko F May 2, 2019, 3:58 p.m. OK PyPy 2 TESTS 76 390 24268800 2300
60190957 beginner1010 F Sept. 6, 2019, 9:20 p.m. OK PyPy 3 TESTS 76 655 41369600 2300
53171482 Daario F April 22, 2019, 10:05 p.m. OK PyPy 3 TESTS 76 857 30515200 2300
65262023 satyamcse F Nov. 17, 2019, 3:22 p.m. OK PyPy 3 TESTS 76 967 31334400 2300
52926523 Mr.Inconsistent F April 17, 2019, 9:03 p.m. OK PyPy 3 TESTS 76 1231 30310400 2300
52931651 ragibshahriar2002 F April 18, 2019, 2:52 a.m. OK PyPy 3 TESTS 76 1247 30208000 2300
52928946 saku7 F April 17, 2019, 11:18 p.m. OK PyPy 3 TESTS 76 1731 16486400 2300
53901288 artifexbm F May 9, 2019, 10:20 a.m. OK PyPy 3 TESTS 76 1825 18432000 2300
59597300 Novel F Aug. 28, 2019, 2:58 a.m. OK PyPy 3 TESTS 76 1887 15974400 2300
54091291 yfo F May 14, 2019, 10:57 a.m. OK PyPy 3 TESTS 76 1996 27545600 2300
52928453 Cifko F April 17, 2019, 10:46 p.m. OK Python 2 TESTS 76 1668 22528000 2300
53969709 nht3008 F May 10, 2019, 7:59 p.m. OK Python 3 TESTS 76 888 15155200 2300
54668082 Lee0715 F May 26, 2019, 2:34 p.m. OK Python 3 TESTS 76 1184 14336000 2300

remove filters

Back to search problems