Codeforces Round 610 (Div. 2)

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
1282 Codeforces Round 610 (Div. 2) FINISHED False 7200 160241087 Dec. 24, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11609 ) B1 K for the Price of One (Easy Version) PROGRAMMING dp greedy sortings 1400

B'This is the easy version of this problem. The only difference is the constraint on k -- the number of gifts in the offer. In this version: k=2 . Vasya came to the store to buy goods for his friends for the New Year. It turned out that he was very lucky -- today the offer " k of goods for the price of one" is held in store. Remember, that in this problem k=2 . Using this offer, Vasya can buy exactly k of any goods, paying only for the most expensive of them. Vasya decided to take this opportunity and buy as many goods as possible for his friends with the money he has. More formally, for each good, its price is determined by a_i -- the number of coins it costs. Initially, Vasya has p coins. He wants to buy the maximum number of goods. Vasya can perform one of the following operations as many times as necessary: Please note that each good can be bought no more than once. For example, if the store now has n=5 goods worth a_1=2, a_2=4, a_3=3, a_4=5, a_5=7 , respectively, k=2 , and Vasya has 6 coins, then he can buy 3 goods. A good with the index 1 will be bought by Vasya without using the offer and he will pay 2 coins. Goods with the indices 2 and 3 Vasya will buy using the offer and he will pay 4 coins. It can be proved that Vasya can not buy more goods with six coins. Help Vasya to find out the maximum number of goods he can buy. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases in the test. The next lines contain a description of t test cases. The first line of each test case contains three integers n, p, k ( 2 <= n <= 2 cdot 10^5 , 1 <= p <= 2 cdot10^9 , k=2 ) -- the number of goods in the store, the number of coins Vasya has and the number of goods that can be bought by the price of the most expensive of them. The second line of each test case contains n integers a_'...

Tutorials

72461

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
67560767 crazy__1234 B1 Dec. 24, 2019, 5:30 p.m. OK Clang++17 Diagnostics TESTS 13 935 19558400 1400
67677797 karthik_7 B1 Dec. 27, 2019, 4:02 a.m. OK Clang++17 Diagnostics TESTS 13 1044 1638400 1400
67536680 avm B1 Dec. 24, 2019, 3:11 p.m. OK D TESTS 13 62 25292800 1400
68629142 rr_ B1 Jan. 12, 2020, 1:30 a.m. OK D TESTS 13 77 11571200 1400
67546663 iica B1 Dec. 24, 2019, 3:51 p.m. OK D TESTS 13 78 11673600 1400
67544044 ruban B1 Dec. 24, 2019, 3:40 p.m. OK Delphi TESTS 13 124 110592000 1400
67548176 PAG B1 Dec. 24, 2019, 3:58 p.m. OK FPC TESTS 13 77 819200 1400
67971162 QuisVenator B1 Dec. 30, 2019, 3:04 p.m. OK GNU C11 TESTS 13 78 819200 1400
67537800 FE40536 B1 Dec. 24, 2019, 3:15 p.m. OK GNU C11 TESTS 13 78 819200 1400
67578408 mth1908 B1 Dec. 25, 2019, 4:27 a.m. OK GNU C11 TESTS 13 78 1638400 1400
67552313 shibohao B1 Dec. 24, 2019, 4:17 p.m. OK GNU C11 TESTS 13 93 819200 1400
67666219 fenofista B1 Dec. 26, 2019, 5:59 p.m. OK GNU C11 TESTS 13 93 819200 1400
67555438 Stratonov_16 B1 Dec. 24, 2019, 4:30 p.m. OK GNU C11 TESTS 13 93 819200 1400
67536287 pengin_2000 B1 Dec. 24, 2019, 3:10 p.m. OK GNU C11 TESTS 13 93 1638400 1400
67570549 kaiboy B1 Dec. 24, 2019, 9:48 p.m. OK GNU C11 TESTS 13 93 1638400 1400
67553290 EatChangmyeong B1 Dec. 24, 2019, 4:21 p.m. OK GNU C11 TESTS 13 93 1638400 1400
67540998 tushar3105 B1 Dec. 24, 2019, 3:28 p.m. OK GNU C11 TESTS 13 93 1638400 1400
69173989 Rose__ B1 Jan. 20, 2020, 7:19 a.m. OK GNU C++11 TESTS 13 30 3174400 1400
68431201 3615 B1 Jan. 9, 2020, 6:55 a.m. OK GNU C++11 TESTS 13 31 614400 1400
67542492 Yukari17 B1 Dec. 24, 2019, 3:33 p.m. OK GNU C++11 TESTS 13 31 614400 1400
67530549 DWAE86 B1 Dec. 24, 2019, 2:49 p.m. OK GNU C++11 TESTS 13 31 614400 1400
67539950 zhumingyang B1 Dec. 24, 2019, 3:23 p.m. OK GNU C++11 TESTS 13 31 819200 1400
67533400 MrJoker B1 Dec. 24, 2019, 2:59 p.m. OK GNU C++11 TESTS 13 31 819200 1400
67533302 _DAG_ B1 Dec. 24, 2019, 2:59 p.m. OK GNU C++11 TESTS 13 31 819200 1400
67575299 yuzhechuan B1 Dec. 25, 2019, 1:25 a.m. OK GNU C++11 TESTS 13 31 819200 1400
67948545 yuzhechuan B1 Dec. 30, 2019, 6:37 a.m. OK GNU C++11 TESTS 13 31 819200 1400
67534941 z7z_Eta B1 Dec. 24, 2019, 3:04 p.m. OK GNU C++11 TESTS 13 31 1433600 1400
67537723 KaguraNana B1 Dec. 24, 2019, 3:15 p.m. OK GNU C++14 TESTS 13 31 921600 1400
68592634 tokitsukaze B1 Jan. 11, 2020, 1:07 p.m. OK GNU C++14 TESTS 13 31 921600 1400
68222391 tjd229 B1 Jan. 5, 2020, 5:33 a.m. OK GNU C++14 TESTS 13 46 1536000 1400
67530106 Egor B1 Dec. 24, 2019, 2:48 p.m. OK GNU C++14 TESTS 13 46 2048000 1400
68025287 chw0501 B1 Jan. 1, 2020, 5:07 a.m. OK GNU C++14 TESTS 13 46 2662400 1400
67529188 hyhtsdy B1 Dec. 24, 2019, 2:45 p.m. OK GNU C++14 TESTS 13 46 9011200 1400
67552830 ritik_patel05 B1 Dec. 24, 2019, 4:19 p.m. OK GNU C++14 TESTS 13 61 819200 1400
67661274 mad_nik B1 Dec. 26, 2019, 3:55 p.m. OK GNU C++14 TESTS 13 61 1638400 1400
68496364 ashish_gupta32 B1 Jan. 10, 2020, 1:38 p.m. OK GNU C++14 TESTS 13 61 1638400 1400
67541985 ydk1104 B1 Dec. 24, 2019, 3:31 p.m. OK GNU C++14 TESTS 13 61 2355200 1400
68124770 pmitkov B1 Jan. 3, 2020, 2:44 p.m. OK GNU C++17 TESTS 13 46 819200 1400
67764034 lavin B1 Dec. 28, 2019, 1:58 a.m. OK GNU C++17 TESTS 13 46 819200 1400
67692320 butflfe B1 Dec. 27, 2019, 11:40 a.m. OK GNU C++17 TESTS 13 46 819200 1400
67577141 Aphelios B1 Dec. 25, 2019, 3:26 a.m. OK GNU C++17 TESTS 13 46 819200 1400
67576983 1813004846 B1 Dec. 25, 2019, 3:18 a.m. OK GNU C++17 TESTS 13 46 819200 1400
67579162 lijiatu B1 Dec. 25, 2019, 4:58 a.m. OK GNU C++17 TESTS 13 46 1536000 1400
67551200 kumarpritam863 B1 Dec. 24, 2019, 4:11 p.m. OK GNU C++17 TESTS 13 61 819200 1400
67578676 vjudge2 B1 Dec. 25, 2019, 4:39 a.m. OK GNU C++17 TESTS 13 61 819200 1400
67529863 DanGolov B1 Dec. 24, 2019, 2:47 p.m. OK GNU C++17 TESTS 13 61 819200 1400
68041060 Adam_pxx B1 Jan. 1, 2020, 2:20 p.m. OK GNU C++17 TESTS 13 61 819200 1400
67866873 maguroguma B1 Dec. 29, 2019, 9:59 a.m. OK Go TESTS 13 124 0 1400
67535505 caidodo0_0 B1 Dec. 24, 2019, 3:07 p.m. OK Go TESTS 13 171 0 1400
67540851 XOR-star B1 Dec. 24, 2019, 3:27 p.m. OK Haskell TESTS 13 529 25292800 1400
67688104 Laurens B1 Dec. 27, 2019, 9:50 a.m. OK Haskell TESTS 13 545 32665600 1400
67529637 Lewin B1 Dec. 24, 2019, 2:46 p.m. OK Java 11 TESTS 13 186 0 1400
68074352 Anonymous B1 Jan. 2, 2020, 11:52 a.m. OK Java 11 TESTS 13 187 0 1400
68096679 rohithsajith B1 Jan. 2, 2020, 9:21 p.m. OK Java 11 TESTS 13 217 0 1400
67580853 Azakarka B1 Dec. 25, 2019, 5:59 a.m. OK Java 11 TESTS 13 217 0 1400
67564249 ankyy_0103 B1 Dec. 24, 2019, 6:37 p.m. OK Java 11 TESTS 13 218 0 1400
67553408 ankyy_0103 B1 Dec. 24, 2019, 4:22 p.m. OK Java 11 TESTS 13 218 0 1400
67652851 its_aks_ulure B1 Dec. 26, 2019, 12:49 p.m. OK Java 11 TESTS 13 233 0 1400
67534135 bleh0.5 B1 Dec. 24, 2019, 3:02 p.m. OK Java 11 TESTS 13 233 0 1400
67537452 lightseba B1 Dec. 24, 2019, 3:14 p.m. OK Java 11 TESTS 13 233 9932800 1400
67538687 machhra B1 Dec. 24, 2019, 3:18 p.m. OK Java 11 TESTS 13 234 307200 1400
69004251 dipankar12 B1 Jan. 17, 2020, 9:37 p.m. OK Java 8 TESTS 13 124 0 1400
69003111 MahmoudJobeel B1 Jan. 17, 2020, 8:48 p.m. OK Java 8 TESTS 13 124 0 1400
67960199 luchy0120 B1 Dec. 30, 2019, 11:15 a.m. OK Java 8 TESTS 13 124 0 1400
67959502 luchy0120 B1 Dec. 30, 2019, 11 a.m. OK Java 8 TESTS 13 124 0 1400
67676347 bluesky111 B1 Dec. 27, 2019, 2:19 a.m. OK Java 8 TESTS 13 124 0 1400
67564444 arsh1598 B1 Dec. 24, 2019, 6:41 p.m. OK Java 8 TESTS 13 124 0 1400
67564215 RootTwoOverTwelve B1 Dec. 24, 2019, 6:36 p.m. OK Java 8 TESTS 13 124 0 1400
67558858 KharYusuf B1 Dec. 24, 2019, 5:06 p.m. OK Java 8 TESTS 13 124 0 1400
67536629 Mann_27__ B1 Dec. 24, 2019, 3:11 p.m. OK Java 8 TESTS 13 124 0 1400
67546483 Apurva021 B1 Dec. 24, 2019, 3:50 p.m. OK Java 8 TESTS 13 139 0 1400
68964543 Spheniscine B1 Jan. 17, 2020, 3:56 a.m. OK Kotlin TESTS 13 186 5120000 1400
67671977 slemus B1 Dec. 26, 2019, 9:07 p.m. OK Kotlin TESTS 13 296 14643200 1400
67554253 Differum B1 Dec. 24, 2019, 4:25 p.m. OK Kotlin TESTS 13 327 15667200 1400
67533463 old_boo B1 Dec. 24, 2019, 2:59 p.m. OK Kotlin TESTS 13 421 15564800 1400
67536697 AsuraPro B1 Dec. 24, 2019, 3:11 p.m. OK Kotlin TESTS 13 467 15564800 1400
67568620 a11eca B1 Dec. 24, 2019, 8:35 p.m. OK Kotlin TESTS 13 468 1024000 1400
67530126 camypaper B1 Dec. 24, 2019, 2:48 p.m. OK Mono C# TESTS 13 108 3891200 1400
67537953 mban259 B1 Dec. 24, 2019, 3:16 p.m. OK Mono C# TESTS 13 109 14028800 1400
69516305 tomomo2b2 B1 Jan. 25, 2020, 12:06 p.m. OK Mono C# TESTS 13 124 19763200 1400
68864839 artworks B1 Jan. 15, 2020, 1:14 p.m. OK Mono C# TESTS 13 139 20889600 1400
69077930 deCooK B1 Jan. 19, 2020, 4:44 a.m. OK Mono C# TESTS 13 156 13721600 1400
69427789 nastya1199 B1 Jan. 23, 2020, 4:20 p.m. OK Mono C# TESTS 13 171 15360000 1400
67552501 Metwally92 B1 Dec. 24, 2019, 4:18 p.m. OK Mono C# TESTS 13 171 15360000 1400
67536936 sevimlikedicik B1 Dec. 24, 2019, 3:12 p.m. OK Mono C# TESTS 13 186 14028800 1400
67544991 hyzhangzhy B1 Dec. 24, 2019, 3:44 p.m. OK Mono C# TESTS 13 186 19763200 1400
67556040 adeptofharuhism B1 Dec. 24, 2019, 4:32 p.m. OK Mono C# TESTS 13 187 14028800 1400
68586646 vjudge1 B1 Jan. 11, 2020, 11:27 a.m. OK MS C++ TESTS 13 46 1638400 1400
67625675 r57shell B1 Dec. 25, 2019, 9:33 p.m. OK MS C++ TESTS 13 46 2867200 1400
68339987 vjudge2 B1 Jan. 7, 2020, 2:35 a.m. OK MS C++ TESTS 13 61 819200 1400
68340960 vjudge5 B1 Jan. 7, 2020, 3:33 a.m. OK MS C++ TESTS 13 61 1638400 1400
68697168 vjudge5 B1 Jan. 13, 2020, 8:18 a.m. OK MS C++ TESTS 13 61 3174400 1400
67537191 tarattata1 B1 Dec. 24, 2019, 3:13 p.m. OK MS C++ TESTS 13 62 1638400 1400
68313155 vjudge1 B1 Jan. 6, 2020, 12:08 p.m. OK MS C++ TESTS 13 62 2355200 1400
67537743 platter B1 Dec. 24, 2019, 3:15 p.m. OK MS C++ TESTS 13 62 6963200 1400
68591274 vjudge2 B1 Jan. 11, 2020, 12:44 p.m. OK MS C++ TESTS 13 77 1638400 1400
68216551 Wang123123 B1 Jan. 5, 2020, 12:11 a.m. OK MS C++ TESTS 13 140 1638400 1400
67578487 ddh B1 Dec. 25, 2019, 4:31 a.m. OK MS C++ 2017 TESTS 13 77 819200 1400
67680988 pichulia B1 Dec. 27, 2019, 6:23 a.m. OK MS C++ 2017 TESTS 13 77 1638400 1400
67532488 IronArt B1 Dec. 24, 2019, 2:56 p.m. OK MS C++ 2017 TESTS 13 78 819200 1400
68116381 Sleepymint B1 Jan. 3, 2020, 11:36 a.m. OK MS C++ 2017 TESTS 13 78 1638400 1400
68642528 18wh1a0546 B1 Jan. 12, 2020, 7:59 a.m. OK MS C++ 2017 TESTS 13 78 1638400 1400
68608783 varsha_18524 B1 Jan. 11, 2020, 2:56 p.m. OK MS C++ 2017 TESTS 13 78 1638400 1400
67540856 youx B1 Dec. 24, 2019, 3:27 p.m. OK MS C++ 2017 TESTS 13 78 7884800 1400
67535707 Tangerine B1 Dec. 24, 2019, 3:07 p.m. OK MS C++ 2017 TESTS 13 92 819200 1400
67604941 5130 B1 Dec. 25, 2019, 1:15 p.m. OK MS C++ 2017 TESTS 13 92 819200 1400
67553515 KATAYPEPE B1 Dec. 24, 2019, 4:22 p.m. OK MS C++ 2017 TESTS 13 93 819200 1400
68032546 enivek B1 Jan. 1, 2020, 10:08 a.m. OK Node.js TESTS 13 436 19251200 1400
67568603 raj1307 B1 Dec. 24, 2019, 8:34 p.m. OK PyPy 2 TESTS 13 217 14233600 1400
67538264 Horse-kun B1 Dec. 24, 2019, 3:17 p.m. OK PyPy 2 TESTS 13 218 13107200 1400
67533817 iamprayush B1 Dec. 24, 2019, 3 p.m. OK PyPy 2 TESTS 13 280 15155200 1400
67532172 bcollet B1 Dec. 24, 2019, 2:55 p.m. OK PyPy 2 TESTS 13 389 11878400 1400
67945304 MVP B1 Dec. 30, 2019, 4:53 a.m. OK PyPy 2 TESTS 13 405 9830400 1400
67959488 vjudge2 B1 Dec. 30, 2019, 10:59 a.m. OK PyPy 2 TESTS 13 420 9830400 1400
68163197 Soul_Silver B1 Jan. 4, 2020, 11:46 a.m. OK PyPy 2 TESTS 13 420 11366400 1400
67545222 p1geon B1 Dec. 24, 2019, 3:45 p.m. OK PyPy 2 TESTS 13 420 12185600 1400
67974745 jolt.tks B1 Dec. 30, 2019, 4:25 p.m. OK PyPy 2 TESTS 13 436 10956800 1400
67564831 iamprayush B1 Dec. 24, 2019, 6:50 p.m. OK PyPy 2 TESTS 13 436 11878400 1400
67552231 FLOP B1 Dec. 24, 2019, 4:16 p.m. OK PyPy 3 TESTS 13 280 15872000 1400
67669602 mdaw B1 Dec. 26, 2019, 7:34 p.m. OK PyPy 3 TESTS 13 280 17203200 1400
67533440 titia B1 Dec. 24, 2019, 2:59 p.m. OK PyPy 3 TESTS 13 280 17203200 1400
67537003 su565fx B1 Dec. 24, 2019, 3:12 p.m. OK PyPy 3 TESTS 13 295 15974400 1400
67540543 Mukundan314 B1 Dec. 24, 2019, 3:26 p.m. OK PyPy 3 TESTS 13 296 15462400 1400
67648463 Mr.Inconsistent B1 Dec. 26, 2019, 11:09 a.m. OK PyPy 3 TESTS 13 296 82227200 1400
67580367 codershuvo B1 Dec. 25, 2019, 5:41 a.m. OK PyPy 3 TESTS 13 311 17203200 1400
67539569 auouo B1 Dec. 24, 2019, 3:22 p.m. OK PyPy 3 TESTS 13 311 17510400 1400
67560722 thekushalghosh B1 Dec. 24, 2019, 5:29 p.m. OK PyPy 3 TESTS 13 311 17612800 1400
67538164 vit_72 B1 Dec. 24, 2019, 3:16 p.m. OK PyPy 3 TESTS 13 311 17612800 1400
67536601 hooded_sweater B1 Dec. 24, 2019, 3:11 p.m. OK Python 2 TESTS 13 327 10854400 1400
67564207 elistark B1 Dec. 24, 2019, 6:36 p.m. OK Python 2 TESTS 13 342 10956800 1400
67598045 som_soni B1 Dec. 25, 2019, 10:57 a.m. OK Python 2 TESTS 13 358 10956800 1400
67535860 nwi B1 Dec. 24, 2019, 3:08 p.m. OK Python 2 TESTS 13 373 11059200 1400
67535290 anonymous0314 B1 Dec. 24, 2019, 3:06 p.m. OK Python 2 TESTS 13 405 12083200 1400
67539138 Kagemeka B1 Dec. 24, 2019, 3:20 p.m. OK Python 3 TESTS 13 233 14336000 1400
68054770 Gaurav1 B1 Jan. 1, 2020, 9:27 p.m. OK Python 3 TESTS 13 249 13721600 1400
68235186 niodachi B1 Jan. 5, 2020, 10:41 a.m. OK Python 3 TESTS 13 249 14438400 1400
67608009 mstr_shifu B1 Dec. 25, 2019, 2:18 p.m. OK Python 3 TESTS 13 264 13619200 1400
68165202 h8191 B1 Jan. 4, 2020, 12:09 p.m. OK Python 3 TESTS 13 265 13619200 1400
67539895 Hiroshi.K B1 Dec. 24, 2019, 3:23 p.m. OK Python 3 TESTS 13 280 13721600 1400
67556159 olegkrygin9 B1 Dec. 24, 2019, 4:32 p.m. OK Python 3 TESTS 13 280 14028800 1400
68115217 950104 B1 Jan. 3, 2020, 11:11 a.m. OK Python 3 TESTS 13 280 14848000 1400
67566914 Import_ThCODE B1 Dec. 24, 2019, 7:46 p.m. OK Python 3 TESTS 13 296 14540800 1400
68063120 ziddi B1 Jan. 2, 2020, 5:55 a.m. OK Python 3 TESTS 13 311 13619200 1400
67998997 XytenSki B1 Dec. 31, 2019, 9:46 a.m. OK Rust TESTS 13 31 4812800 1400
67533842 tuna_salad B1 Dec. 24, 2019, 3:01 p.m. OK Rust TESTS 13 46 5324800 1400
68953066 sansen B1 Jan. 16, 2020, 6:47 p.m. OK Rust TESTS 13 46 9216000 1400
67536611 yakamoto B1 Dec. 24, 2019, 3:11 p.m. OK Scala TESTS 13 404 0 1400

remove filters

Back to search problems