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 |
---|---|---|---|---|---|---|
1697 | Educational Codeforces Round 130 (Rated for Div. 2) | FINISHED | False | 7200 | 76778699 | June 12, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 26913 ) | B | Promo | PROGRAMMING | greedy sortings |
B"The store sells n items, the price of the i -th item is p_i . The store's management is going to hold a promotion: if a customer purchases at least x items, y cheapest of them are free. The management has not yet decided on the exact values of x and y . Therefore, they ask you to process q queries: for the given values of x and y , determine the maximum total value of items received for free, if a customer makes one purchase. Note that all queries are independent; they don't affect the store's stock. The first line contains two integers n and q ( 1 <= n, q <= 2 cdot 10^5 ) -- the number of items in the store and the number of queries, respectively. The second line contains n integers p_1, p_2, ... , p_n ( 1 <= p_i <= 10^6 ), where p_i -- the price of the i -th item. The following q lines contain two integers x_i and y_i each ( 1 <= y_i <= x_i <= n ) -- the values of the parameters x and y in the i -th query. For each query, print a single integer -- the maximum total value of items received for free for one purchase. In the first query, a customer can buy three items worth 5, 3, 5 , the two cheapest of them are 3 + 5 = 8 . In the second query, a customer can buy two items worth 5 and 5 , the cheapest of them is 5 . In the third query, a customer has to buy all the items to receive the three cheapest of them for free; their total price is 1 + 2 + 3 = 6 . "... |
103835 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
160390439 | chrisfcoder | B | June 13, 2022, 2:54 a.m. | OK | C# 10 | TESTS | 3 | 170 | 29491200 | ||
160390295 | chrisfcoder | B | June 13, 2022, 2:50 a.m. | OK | C# 10 | TESTS | 3 | 170 | 29491200 | ||
160384103 | offbysome | B | June 12, 2022, 10:46 p.m. | OK | C# 10 | TESTS | 3 | 701 | 29798400 | ||
160386986 | bluemegane | B | June 13, 2022, 1:06 a.m. | OK | C# 8 | TESTS | 3 | 249 | 35430400 | ||
160374416 | GTrigger | B | June 12, 2022, 6:53 p.m. | OK | GNU C11 | TESTS | 3 | 156 | 1638400 | ||
160391184 | cryptobear | B | June 13, 2022, 3:13 a.m. | OK | GNU C11 | TESTS | 3 | 967 | 3174400 | ||
160373432 | Abhishek_Tewatia | B | June 12, 2022, 6:39 p.m. | OK | GNU C11 | TESTS | 3 | 982 | 3174400 | ||
160388410 | MiTuA | B | June 13, 2022, 1:58 a.m. | OK | GNU C++14 | TESTS | 3 | 171 | 2457600 | ||
160391891 | Beginner343 | B | June 13, 2022, 3:30 a.m. | OK | GNU C++14 | TESTS | 3 | 171 | 2457600 | ||
160360025 | MidnightKinG | B | June 12, 2022, 4:39 p.m. | OK | GNU C++14 | TESTS | 3 | 187 | 16076800 | ||
160383669 | zwh1234 | B | June 12, 2022, 10:26 p.m. | OK | GNU C++14 | TESTS | 3 | 202 | 3174400 | ||
160362040 | IstyFatinFaiaz | B | June 12, 2022, 4:50 p.m. | OK | GNU C++14 | TESTS | 3 | 202 | 3174400 | ||
160361034 | Commonrain | B | June 12, 2022, 4:44 p.m. | OK | GNU C++14 | TESTS | 3 | 202 | 6451200 | ||
160379432 | Danish7 | B | June 12, 2022, 8:22 p.m. | OK | GNU C++14 | TESTS | 3 | 218 | 2355200 | ||
160388126 | whitesword | B | June 13, 2022, 1:49 a.m. | OK | GNU C++14 | TESTS | 3 | 218 | 2457600 | ||
160398823 | Puspendra18 | B | June 13, 2022, 5:47 a.m. | OK | GNU C++14 | TESTS | 3 | 233 | 1638400 | ||
160396811 | frust2020 | B | June 13, 2022, 5:11 a.m. | OK | GNU C++14 | TESTS | 3 | 233 | 1638400 | ||
160361261 | thatsmeSusnata | B | June 12, 2022, 4:46 p.m. | OK | GNU C++17 | TESTS | 3 | 78 | 19251200 | ||
160374141 | 18-RASHIK-1 | B | June 12, 2022, 6:49 p.m. | OK | GNU C++17 | TESTS | 3 | 171 | 1638400 | ||
160375633 | Steve120 | B | June 12, 2022, 7:13 p.m. | OK | GNU C++17 | TESTS | 3 | 171 | 1638400 | ||
160381507 | aur0ra | B | June 12, 2022, 9:14 p.m. | OK | GNU C++17 | TESTS | 3 | 171 | 4198400 | ||
160359404 | ech0_7 | B | June 12, 2022, 4:37 p.m. | OK | GNU C++17 | TESTS | 3 | 171 | 4812800 | ||
160395236 | UchihaMadara | B | June 13, 2022, 4:42 a.m. | OK | GNU C++17 | TESTS | 3 | 186 | 1638400 | ||
160371761 | dchaudhary27 | B | June 12, 2022, 6:18 p.m. | OK | GNU C++17 | TESTS | 3 | 186 | 1638400 | ||
160389613 | GuAn666 | B | June 13, 2022, 2:33 a.m. | OK | GNU C++17 | TESTS | 3 | 186 | 3174400 | ||
160388177 | l1l1l1l1 | B | June 13, 2022, 1:51 a.m. | OK | GNU C++17 | TESTS | 3 | 186 | 3174400 | ||
160389326 | nestling | B | June 13, 2022, 2:24 a.m. | OK | GNU C++17 | TESTS | 3 | 187 | 1638400 | ||
160385110 | Freedom__King | B | June 12, 2022, 11:37 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 30 | 8499200 | ||
160385739 | xiece666 | B | June 13, 2022, 12:08 a.m. | OK | GNU C++17 (64) | TESTS | 3 | 109 | 2662400 | ||
160385149 | e3c8f1a924 | B | June 12, 2022, 11:39 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 109 | 7680000 | ||
160377159 | NewLul | B | June 12, 2022, 7:37 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 124 | 1638400 | ||
160364375 | Time_JYF | B | June 12, 2022, 5:05 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 124 | 1638400 | ||
160382876 | avicodes | B | June 12, 2022, 9:57 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 124 | 3174400 | ||
160385406 | PCC | B | June 12, 2022, 11:52 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 124 | 3174400 | ||
160388022 | Ayalla | B | June 13, 2022, 1:45 a.m. | OK | GNU C++17 (64) | TESTS | 3 | 124 | 3174400 | ||
160388564 | 1127193030 | B | June 13, 2022, 2:03 a.m. | OK | GNU C++17 (64) | TESTS | 3 | 124 | 3174400 | ||
160398059 | raghhavdturki | B | June 13, 2022, 5:34 a.m. | OK | GNU C++17 (64) | TESTS | 3 | 124 | 3174400 | ||
160360438 | SeanMcgrath | B | June 12, 2022, 4:41 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 62 | 6144000 | ||
160361475 | maylore | B | June 12, 2022, 4:47 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 92 | 1638400 | ||
160363014 | p.ferrari | B | June 12, 2022, 4:56 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 92 | 1638400 | ||
160394626 | sanken | B | June 13, 2022, 4:29 a.m. | OK | GNU C++20 (64) | TESTS | 3 | 92 | 3174400 | ||
160370963 | Buffon_Limit_Exceeded | B | June 12, 2022, 6:08 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 93 | 1536000 | ||
160383567 | Ali_Tarek10 | B | June 12, 2022, 10:22 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 93 | 1638400 | ||
160397835 | ishwarendra | B | June 13, 2022, 5:29 a.m. | OK | GNU C++20 (64) | TESTS | 3 | 93 | 1638400 | ||
160395979 | hy0uka | B | June 13, 2022, 4:56 a.m. | OK | GNU C++20 (64) | TESTS | 3 | 93 | 1638400 | ||
160386855 | PaNNiiiiC | B | June 13, 2022, 1:01 a.m. | OK | GNU C++20 (64) | TESTS | 3 | 93 | 1638400 | ||
160384003 | Ali_Tarek10 | B | June 12, 2022, 10:41 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 93 | 1638400 | ||
160381056 | peakle | B | June 12, 2022, 9:02 p.m. | OK | Go | TESTS | 3 | 717 | 15667200 | ||
160367525 | notposeidon | B | June 12, 2022, 5:31 p.m. | OK | Haskell | TESTS | 3 | 1887 | 59904000 | ||
160386866 | satyaa_78 | B | June 13, 2022, 1:01 a.m. | OK | Java 11 | TESTS | 3 | 248 | 0 | ||
160364680 | for.toobye321 | B | June 12, 2022, 5:07 p.m. | OK | Java 11 | TESTS | 3 | 248 | 0 | ||
160370154 | Juhaied_nabid | B | June 12, 2022, 5:59 p.m. | OK | Java 11 | TESTS | 3 | 249 | 1024000 | ||
160372946 | thunderbolt_sid | B | June 12, 2022, 6:33 p.m. | OK | Java 11 | TESTS | 3 | 264 | 921600 | ||
160364572 | for.toobye321 | B | June 12, 2022, 5:06 p.m. | OK | Java 11 | TESTS | 3 | 280 | 0 | ||
160369000 | weiweiwei_ | B | June 12, 2022, 5:45 p.m. | OK | Java 11 | TESTS | 3 | 326 | 0 | ||
160388024 | weiweiwei_ | B | June 13, 2022, 1:45 a.m. | OK | Java 11 | TESTS | 3 | 327 | 0 | ||
160364767 | weiweiwei_ | B | June 12, 2022, 5:07 p.m. | OK | Java 11 | TESTS | 3 | 327 | 0 | ||
160389219 | saga086 | B | June 13, 2022, 2:21 a.m. | OK | Java 11 | TESTS | 3 | 327 | 409600 | ||
160361185 | freehandle | B | June 12, 2022, 4:45 p.m. | OK | Java 11 | TESTS | 3 | 342 | 0 | ||
160385851 | sanketmakani | B | June 13, 2022, 12:13 a.m. | OK | Java 8 | TESTS | 3 | 202 | 0 | ||
160399007 | WrongAnswerOnTestCase2 | B | June 13, 2022, 5:50 a.m. | OK | Java 8 | TESTS | 3 | 280 | 2867200 | ||
160396176 | DylanSmith | B | June 13, 2022, 5 a.m. | OK | Java 8 | TESTS | 3 | 280 | 2969600 | ||
160391577 | csdn-zhigeng | B | June 13, 2022, 3:23 a.m. | OK | Java 8 | TESTS | 3 | 280 | 2969600 | ||
160361816 | amit_roy | B | June 12, 2022, 4:49 p.m. | OK | Java 8 | TESTS | 3 | 280 | 5939200 | ||
160383123 | AbdelrahmanFathy | B | June 12, 2022, 10:05 p.m. | OK | Java 8 | TESTS | 3 | 280 | 78950400 | ||
160390859 | alephnulled | B | June 13, 2022, 3:05 a.m. | OK | Java 8 | TESTS | 3 | 295 | 2969600 | ||
160362508 | KhadijaBadrawy | B | June 12, 2022, 4:53 p.m. | OK | Java 8 | TESTS | 3 | 295 | 2969600 | ||
160397624 | csdn-zhigeng | B | June 13, 2022, 5:25 a.m. | OK | Java 8 | TESTS | 3 | 311 | 13516800 | ||
160367877 | toufique_husein | B | June 12, 2022, 5:34 p.m. | OK | Java 8 | TESTS | 3 | 810 | 102400 | ||
160370959 | sirius08 | B | June 12, 2022, 6:08 p.m. | OK | Kotlin 1.6 | TESTS | 3 | 1809 | 15974400 | ||
160370842 | sirius08 | B | June 12, 2022, 6:06 p.m. | OK | Kotlin 1.6 | TESTS | 3 | 1871 | 15974400 | ||
160374378 | Zhuchokk | B | June 12, 2022, 6:53 p.m. | OK | Mono C# | TESTS | 3 | 1387 | 25292800 | ||
160385432 | whiteReboot | B | June 12, 2022, 11:53 p.m. | OK | MS C++ 2017 | TESTS | 3 | 561 | 2355200 | ||
160391539 | TemporalBloom | B | June 13, 2022, 3:21 a.m. | OK | MS C++ 2017 | TESTS | 3 | 1169 | 3174400 | ||
160369486 | Nosov_Vovanus2022 | B | June 12, 2022, 5:51 p.m. | OK | MS C++ 2017 | TESTS | 3 | 1169 | 3174400 | ||
160393698 | Sanjeev_M_S_D | B | June 13, 2022, 4:10 a.m. | OK | MS C++ 2017 | TESTS | 3 | 1201 | 1638400 | ||
160361594 | Vovi_Ti | B | June 12, 2022, 4:48 p.m. | OK | MS C++ 2017 | TESTS | 3 | 1201 | 2457600 | ||
160361654 | hsieyitai | B | June 12, 2022, 4:48 p.m. | OK | MS C++ 2017 | TESTS | 3 | 1201 | 3174400 | ||
160369414 | Nosov_Vovanus2022 | B | June 12, 2022, 5:50 p.m. | OK | MS C++ 2017 | TESTS | 3 | 1232 | 3174400 | ||
160391662 | TemporalBloom | B | June 13, 2022, 3:25 a.m. | OK | MS C++ 2017 | TESTS | 3 | 1310 | 12902400 | ||
160359864 | zxcuser2 | B | June 12, 2022, 4:39 p.m. | OK | PyPy 3 | TESTS | 3 | 904 | 25497600 | ||
160373841 | ahmedsiad | B | June 12, 2022, 6:45 p.m. | OK | PyPy 3 | TESTS | 3 | 904 | 27545600 | ||
160396114 | ambs_ | B | June 13, 2022, 4:58 a.m. | OK | PyPy 3 | TESTS | 3 | 950 | 26931200 | ||
160374900 | saheb143 | B | June 12, 2022, 7:01 p.m. | OK | PyPy 3 | TESTS | 3 | 967 | 32972800 | ||
160363795 | Ayushman_123 | B | June 12, 2022, 5:01 p.m. | OK | PyPy 3 | TESTS | 3 | 1029 | 30003200 | ||
160387257 | YashNandwana | B | June 13, 2022, 1:18 a.m. | OK | PyPy 3 | TESTS | 3 | 1606 | 36864000 | ||
160377490 | xorca | B | June 12, 2022, 7:42 p.m. | OK | PyPy 3-64 | TESTS | 3 | 186 | 32460800 | ||
160369482 | pykid05 | B | June 12, 2022, 5:51 p.m. | OK | PyPy 3-64 | TESTS | 3 | 217 | 30822400 | ||
160363403 | a_vantik_a | B | June 12, 2022, 4:58 p.m. | OK | PyPy 3-64 | TESTS | 3 | 217 | 30822400 | ||
160380642 | iron_nicko | B | June 12, 2022, 8:51 p.m. | OK | PyPy 3-64 | TESTS | 3 | 233 | 30310400 | ||
160366367 | oadey89 | B | June 12, 2022, 5:20 p.m. | OK | PyPy 3-64 | TESTS | 3 | 249 | 33382400 | ||
160359829 | hash1023 | B | June 12, 2022, 4:39 p.m. | OK | PyPy 3-64 | TESTS | 3 | 264 | 33484800 | ||
160363472 | feelme | B | June 12, 2022, 4:59 p.m. | OK | PyPy 3-64 | TESTS | 3 | 280 | 31232000 | ||
160398401 | AD18 | B | June 13, 2022, 5:40 a.m. | OK | PyPy 3-64 | TESTS | 3 | 389 | 40038400 | ||
160376775 | MohamedHamed123 | B | June 12, 2022, 7:31 p.m. | OK | PyPy 3-64 | TESTS | 3 | 638 | 26624000 | ||
160380000 | iron_nicko | B | June 12, 2022, 8:35 p.m. | OK | PyPy 3-64 | TESTS | 3 | 655 | 20684800 | ||
160376725 | MohamedHamed123 | B | June 12, 2022, 7:30 p.m. | OK | Python 3 | TESTS | 3 | 748 | 13926400 | ||
160375695 | MohamedHamed123 | B | June 12, 2022, 7:14 p.m. | OK | Python 3 | TESTS | 3 | 748 | 13926400 | ||
160375294 | MohamedHamed123 | B | June 12, 2022, 7:07 p.m. | OK | Python 3 | TESTS | 3 | 779 | 13926400 | ||
160392684 | DaRk_hEaRt_ | B | June 13, 2022, 3:48 a.m. | OK | Python 3 | TESTS | 3 | 794 | 13414400 | ||
160395897 | rishabh_0602 | B | June 13, 2022, 4:54 a.m. | OK | Python 3 | TESTS | 3 | 810 | 13926400 | ||
160394177 | vrishabshetty | B | June 13, 2022, 4:20 a.m. | OK | Python 3 | TESTS | 3 | 811 | 13926400 | ||
160374049 | ahmedsiad | B | June 12, 2022, 6:48 p.m. | OK | Python 3 | TESTS | 3 | 841 | 13926400 | ||
160374836 | vipul_mehra | B | June 12, 2022, 7 p.m. | OK | Python 3 | TESTS | 3 | 857 | 13107200 | ||
160388985 | chemistry_guy | B | June 13, 2022, 2:15 a.m. | OK | Python 3 | TESTS | 3 | 857 | 13926400 | ||
160388636 | bridgekiller | B | June 13, 2022, 2:05 a.m. | OK | Python 3 | TESTS | 3 | 889 | 13926400 | ||
160392657 | Thallium54 | B | June 13, 2022, 3:47 a.m. | OK | Rust 2021 | TESTS | 3 | 46 | 7680000 | ||
160357927 | T0RA | B | June 12, 2022, 4:33 p.m. | OK | Rust 2021 | TESTS | 3 | 109 | 14848000 | ||
160391052 | Flavanoid | B | June 13, 2022, 3:10 a.m. | OK | Rust 2021 | TESTS | 3 | 124 | 15052800 | ||
160390869 | Flavanoid | B | June 13, 2022, 3:05 a.m. | OK | Rust 2021 | TESTS | 3 | 139 | 15052800 |
Back to search problems