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 |
---|---|---|---|---|---|---|
1793 | Codeforces Round 852 (Div. 2) | FINISHED | False | 7200 | 60989063 | Feb. 12, 2023, 8:35 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1126 ) | E | Velepin and Marketing | PROGRAMMING | data structures dp greedy sortings |
B"The famous writer Velepin is very productive. Recently, he signed a contract with a well-known publication and now he needs to write k_i books for i -th year. This is not a problem for him at all, he can write as much as he wants about samurai, space, emptiness, insects and werewolves. He has n regular readers, each of whom in the i -th year will read one of the k_i books published by Velepin. Readers are very fond of discussing books, so the j -th of them will be satisfied within a year if at least a_j persons read the same book as him (including himself). Velepin has obvious problems with marketing, so he turned to you! A well-known book reading service can control what each of Velepin's regular readers will read, but he does not want books to be wasted, so someone should read each book. And so they turned to you with a request to tell you what the maximum number of regular readers can be made satisfied during each of the years, if you can choose each person the book he will read. The first line contains a single integer n (2 <= n <= 3 cdot 10^5) -- the number of regular readers of Velepin. The second line contains n integers a_1, a_2, ldots, a_n (1 <= a_i <= n) -- the number of necessary readers of the same book for the happiness of the i -th person. The third line contains a single integer q (1 <= q <= 3 cdot 10^5) -- the number of years to analyze. Each of the following q lines contains a single integer k_j (2 <= k_j <= n) -- the number of books that Velepin must write in j -th a year. Print q lines, each of them has exactly one number -- the maximum number of people who can be satisfied in j -th a year if Velepin releases k_j books. In the first example, in the first year, the optimal division is 1, 2, 2, 2, 2 (the first book is read by the first person, and everyone else reads the second). In the second "... |
Codeforces Round #852 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
193413446 | EricKong | E | Feb. 13, 2023, 2:33 a.m. | OK | GNU C++14 | TESTS | 41 | 46 | 10240000 | ||
193413120 | LXH-cat | E | Feb. 13, 2023, 2:25 a.m. | OK | GNU C++14 | TESTS | 41 | 62 | 3788800 | ||
193412872 | LXH-cat | E | Feb. 13, 2023, 2:19 a.m. | OK | GNU C++14 | TESTS | 41 | 62 | 3788800 | ||
193410574 | TYpeWriting | E | Feb. 13, 2023, 1:12 a.m. | OK | GNU C++14 | TESTS | 41 | 109 | 5734400 | ||
193410496 | TYpeWriting | E | Feb. 13, 2023, 1:09 a.m. | OK | GNU C++14 | TESTS | 41 | 109 | 5734400 | ||
193418195 | HeTao | E | Feb. 13, 2023, 4:24 a.m. | OK | GNU C++14 | TESTS | 41 | 202 | 4812800 | ||
193373046 | abhi.bhardwaj9868 | E | Feb. 12, 2023, 4:41 p.m. | OK | GNU C++14 | TESTS | 41 | 217 | 4812800 | ||
193412791 | LXH-cat | E | Feb. 13, 2023, 2:17 a.m. | OK | GNU C++14 | TESTS | 41 | 217 | 6041600 | ||
193420789 | hungry1234 | E | Feb. 13, 2023, 5:12 a.m. | OK | GNU C++14 | TESTS | 41 | 218 | 4812800 | ||
193408030 | schrodingerstom | E | Feb. 12, 2023, 11:58 p.m. | OK | GNU C++14 | TESTS | 41 | 218 | 4812800 | ||
193384025 | WildWeasel | E | Feb. 12, 2023, 6:14 p.m. | OK | GNU C++17 | TESTS | 41 | 202 | 7987200 | ||
193421776 | jaimanpandya | E | Feb. 13, 2023, 5:29 a.m. | OK | GNU C++17 | TESTS | 41 | 217 | 3584000 | ||
193397017 | manavspg2 | E | Feb. 12, 2023, 8:27 p.m. | OK | GNU C++17 | TESTS | 41 | 217 | 20070400 | ||
193377309 | lotusblume | E | Feb. 12, 2023, 5:16 p.m. | OK | GNU C++17 | TESTS | 41 | 218 | 3584000 | ||
193349039 | Gromyko | E | Feb. 12, 2023, 1:16 p.m. | OK | GNU C++17 | TESTS | 41 | 218 | 4812800 | ||
193339908 | Paul_Liao_1457 | E | Feb. 12, 2023, 11:53 a.m. | OK | GNU C++17 | TESTS | 41 | 218 | 9625600 | ||
193339768 | Paul_Liao_1457 | E | Feb. 12, 2023, 11:52 a.m. | OK | GNU C++17 | TESTS | 41 | 233 | 9625600 | ||
193372529 | dmenezes | E | Feb. 12, 2023, 4:37 p.m. | OK | GNU C++17 | TESTS | 41 | 234 | 3584000 | ||
193376180 | Remake_man | E | Feb. 12, 2023, 5:07 p.m. | OK | GNU C++17 | TESTS | 41 | 234 | 4812800 | ||
193421763 | FeFinal | E | Feb. 13, 2023, 5:29 a.m. | OK | GNU C++17 | TESTS | 41 | 249 | 4812800 | ||
193416820 | Remilia1023 | E | Feb. 13, 2023, 3:52 a.m. | OK | GNU C++17 (64) | TESTS | 41 | 78 | 6963200 | ||
193356085 | UltramanDecker | E | Feb. 12, 2023, 2:15 p.m. | OK | GNU C++17 (64) | TESTS | 41 | 124 | 5120000 | ||
193346394 | xyl1234 | E | Feb. 12, 2023, 12:53 p.m. | OK | GNU C++17 (64) | TESTS | 41 | 124 | 24064000 | ||
193412723 | qidirj | E | Feb. 13, 2023, 2:15 a.m. | OK | GNU C++17 (64) | TESTS | 41 | 155 | 3584000 | ||
193371927 | SA01 | E | Feb. 12, 2023, 4:33 p.m. | OK | GNU C++17 (64) | TESTS | 41 | 155 | 3584000 | ||
193422556 | Once_I_Liked_AGirl | E | Feb. 13, 2023, 5:41 a.m. | OK | GNU C++17 (64) | TESTS | 41 | 155 | 4812800 | ||
193422540 | Once_I_Liked_AGirl | E | Feb. 13, 2023, 5:41 a.m. | OK | GNU C++17 (64) | TESTS | 41 | 170 | 4812800 | ||
193422495 | QAQ_Becase | E | Feb. 13, 2023, 5:41 a.m. | OK | GNU C++17 (64) | TESTS | 41 | 171 | 24064000 | ||
193383181 | YocyCraft | E | Feb. 12, 2023, 6:06 p.m. | OK | GNU C++17 (64) | TESTS | 41 | 186 | 4812800 | ||
193414725 | strange757 | E | Feb. 13, 2023, 3:04 a.m. | OK | GNU C++17 (64) | TESTS | 41 | 187 | 3584000 | ||
193414217 | cyb1010 | E | Feb. 13, 2023, 2:50 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 46 | 10240000 | ||
193413229 | cyb1010 | E | Feb. 13, 2023, 2:27 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 46 | 10240000 | ||
193413308 | cyb1010 | E | Feb. 13, 2023, 2:30 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 62 | 14438400 | ||
193412560 | cyb1010 | E | Feb. 13, 2023, 2:11 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 109 | 3584000 | ||
193412291 | cyb1010 | E | Feb. 13, 2023, 2:04 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 109 | 3584000 | ||
193409776 | AkaiLemon | E | Feb. 13, 2023, 12:47 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 109 | 3584000 | ||
193412373 | cyb1010 | E | Feb. 13, 2023, 2:06 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 124 | 3584000 | ||
193412266 | cyb1010 | E | Feb. 13, 2023, 2:04 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 124 | 3584000 | ||
193411256 | Licykoc | E | Feb. 13, 2023, 1:33 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 124 | 3584000 | ||
193375801 | apoorv_me | E | Feb. 12, 2023, 5:04 p.m. | OK | GNU C++20 (64) | TESTS | 41 | 124 | 3584000 | ||
193415927 | profchi | E | Feb. 13, 2023, 3:33 a.m. | OK | Java 11 | TESTS | 41 | 685 | 14028800 |
Back to search problems