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 |
|---|---|---|---|---|---|---|
| 183 | Croc Champ 2012 - Final | FINISHED | False | 7200 | 440872823 | April 27, 2012, 1:20 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 186 ) | E | Candy Shop | PROGRAMMING | greedy | 2700 |
The prestigious Codeforces kindergarten consists of n kids, numbered 1 through n . Each of them are given allowance in rubles by their parents. Today, they are going to the most famous candy shop in the town. The shop sells candies in packages: for all i between 1 and m , inclusive, it sells a package containing exactly i candies. A candy costs one ruble, so a package containing x candies costs x rubles. The kids will purchase candies in turns, starting from kid 1. In a single turn, kid i will purchase one candy package. Due to the highly competitive nature of Codeforces kindergarten, during a turn, the number of candies contained in the package purchased by the kid will always be strictly greater than the number of candies contained in the package purchased by the kid in the preceding turn (an exception is in the first turn: the first kid may purchase any package). Then, the turn proceeds to kid i + 1 , or to kid 1 if it was kid n 's turn. This process can be ended at any time, but at the end of the purchase process, all the kids must have the same number of candy packages . Of course, the amount spent by each kid on the candies cannot exceed their allowance. You work at the candy shop and would like to prepare the candies for the kids. Print the maximum number of candies that can be sold by the candy shop to the kids. If the kids cannot purchase any candy (due to insufficient allowance), print 0 . The first line contains two space-separated integers n and m (2 ≤ n ≤ 2·10 5 , 2 ≤ m ≤ 5·10 6 , n ≤ m ), denoting the number of kids and the maximum number of candies in a package sold by the candy shop, respectively. Then n lines follow, each line will contain a single positive integer not exceeding denoting the allowance of a kid in rubles. The allowances are given in order from kid 1 to kid n . Please, do not use the %lld specificator to read or write 64-bit integers in C++. It is recommended to use cin , cout streams (also you may use %I64d specificator). P |
| CROC Champ 2012 — Round 3 (Editorial) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 3788707 | Rubanenko | E | May 28, 2013, 4:57 p.m. | OK | FPC | TESTS | 131 | 968 | 3379200 | 2700 | |
| 3788697 | Rubanenko | E | May 28, 2013, 4:52 p.m. | OK | FPC | TESTS | 131 | 984 | 3379200 | 2700 | |
| 11271268 | Amr_Hassan | E | May 25, 2015, 10:18 p.m. | OK | FPC | TESTS | 131 | 1060 | 3379200 | 2700 | |
| 15141496 | HappyNewYearMike | E | Dec. 31, 2015, 9:32 p.m. | OK | FPC | TESTS | 131 | 1092 | 3379200 | 2700 | |
| 4071689 | vjudge2 | E | July 15, 2013, 1:01 a.m. | OK | GNU C | TESTS | 131 | 203 | 80179200 | 2700 | |
| 27825756 | Worldwide_D | E | June 16, 2017, 1:11 p.m. | OK | GNU C++ | TESTS | 131 | 124 | 2969600 | 2700 | |
| 40991297 | ReaLNero1 | E | July 31, 2018, 12:33 a.m. | OK | GNU C++ | TESTS | 131 | 154 | 79974400 | 2700 | |
| 25308546 | yutaka1999 | E | March 7, 2017, 6:23 a.m. | OK | GNU C++ | TESTS | 131 | 156 | 8294400 | 2700 | |
| 16611246 | Arturia | E | March 9, 2016, 4:25 a.m. | OK | GNU C++ | TESTS | 131 | 156 | 79974400 | 2700 | |
| 14169794 | 130705009 | E | Nov. 9, 2015, 12:11 p.m. | OK | GNU C++ | TESTS | 131 | 186 | 1433600 | 2700 | |
| 7196617 | wjh720 | E | July 21, 2014, 4:05 p.m. | OK | GNU C++ | TESTS | 131 | 186 | 1536000 | 2700 | |
| 40720806 | zhouyuyang | E | July 25, 2018, 1:06 a.m. | OK | GNU C++ | TESTS | 131 | 186 | 1638400 | 2700 | |
| 5614542 | PSDEV | E | Jan. 4, 2014, 8:04 a.m. | OK | GNU C++ | TESTS | 131 | 186 | 3174400 | 2700 | |
| 4336838 | rares.buhai | E | Aug. 25, 2013, 5:10 p.m. | OK | GNU C++ | TESTS | 131 | 186 | 3174400 | 2700 | |
| 24280963 | black_horse2014 | E | Jan. 31, 2017, 2:51 a.m. | OK | GNU C++ | TESTS | 131 | 186 | 3891200 | 2700 | |
| 57901001 | lopare | E | July 28, 2019, 3:40 p.m. | OK | GNU C++11 | TESTS | 131 | 156 | 1638400 | 2700 | |
| 18910309 | AkaneSasu | E | July 6, 2016, 2:53 a.m. | OK | GNU C++11 | TESTS | 131 | 156 | 79974400 | 2700 | |
| 57822512 | py_ultron | E | July 27, 2019, 12:39 a.m. | OK | GNU C++11 | TESTS | 131 | 186 | 1638400 | 2700 | |
| 27471636 | 754986421653 | E | May 31, 2017, 5:06 p.m. | OK | GNU C++11 | TESTS | 131 | 186 | 1638400 | 2700 | |
| 35843341 | ______u______ | E | March 2, 2018, 3:10 p.m. | OK | GNU C++11 | TESTS | 131 | 186 | 3788800 | 2700 | |
| 35843313 | ______n______ | E | March 2, 2018, 3:10 p.m. | OK | GNU C++11 | TESTS | 131 | 186 | 3788800 | 2700 | |
| 35843099 | _____i_____ | E | March 2, 2018, 3:06 p.m. | OK | GNU C++11 | TESTS | 131 | 186 | 3788800 | 2700 | |
| 35842880 | _____k_____ | E | March 2, 2018, 3:01 p.m. | OK | GNU C++11 | TESTS | 131 | 186 | 3788800 | 2700 | |
| 35837974 | ______k______ | E | March 2, 2018, 1:22 p.m. | OK | GNU C++11 | TESTS | 131 | 186 | 3788800 | 2700 | |
| 35837971 | ______h______ | E | March 2, 2018, 1:22 p.m. | OK | GNU C++11 | TESTS | 131 | 186 | 3788800 | 2700 | |
| 41153663 | MAMBA | E | Aug. 3, 2018, 10:36 a.m. | OK | GNU C++14 | TESTS | 131 | 248 | 3174400 | 2700 | |
| 40568643 | golden_deathadder | E | July 20, 2018, 6:55 a.m. | OK | GNU C++14 | TESTS | 131 | 248 | 3174400 | 2700 | |
| 37873298 | throwaway1234 | E | May 4, 2018, 1:33 a.m. | OK | GNU C++14 | TESTS | 131 | 248 | 4915200 | 2700 | |
| 40568718 | golden_deathadder | E | July 20, 2018, 6:57 a.m. | OK | GNU C++14 | TESTS | 131 | 278 | 3174400 | 2700 | |
| 40568665 | vjudge1 | E | July 20, 2018, 6:55 a.m. | OK | GNU C++14 | TESTS | 131 | 280 | 3174400 | 2700 | |
| 35799420 | iqqsoszs | E | March 1, 2018, 1:13 a.m. | OK | GNU C++14 | TESTS | 131 | 280 | 5120000 | 2700 | |
| 23494181 | Ali.Pi | E | Jan. 2, 2017, 6:49 a.m. | OK | GNU C++14 | TESTS | 131 | 280 | 49971200 | 2700 | |
| 41331971 | AryanSM | E | Aug. 8, 2018, 9:17 a.m. | OK | GNU C++14 | TESTS | 131 | 342 | 3481600 | 2700 | |
| 37873306 | throwaway1234 | E | May 4, 2018, 1:35 a.m. | OK | GNU C++14 | TESTS | 131 | 404 | 6553600 | 2700 | |
| 37873310 | throwaway1234 | E | May 4, 2018, 1:36 a.m. | OK | GNU C++14 | TESTS | 131 | 904 | 26009600 | 2700 | |
| 57824435 | ArshiaDadras | E | July 27, 2019, 2:06 a.m. | OK | GNU C++17 | TESTS | 131 | 218 | 3174400 | 2700 | |
| 66452251 | hjk1030 | E | Dec. 7, 2019, 11:54 a.m. | OK | GNU C++17 | TESTS | 131 | 248 | 3174400 | 2700 | |
| 44651798 | ruo | E | Oct. 21, 2018, 11:41 a.m. | OK | GNU C++17 | TESTS | 131 | 248 | 3481600 | 2700 | |
| 53693151 | Kmcode | E | May 3, 2019, 6:15 a.m. | OK | GNU C++17 | TESTS | 131 | 248 | 3788800 | 2700 | |
| 57781960 | Shayan.P | E | July 26, 2019, 6:19 a.m. | OK | GNU C++17 | TESTS | 131 | 248 | 7987200 | 2700 | |
| 53693119 | Kmcode | E | May 3, 2019, 6:14 a.m. | OK | GNU C++17 | TESTS | 131 | 278 | 3788800 | 2700 | |
| 41951695 | johnchen902 | E | Aug. 22, 2018, 2:07 a.m. | OK | GNU C++17 | TESTS | 131 | 2306 | 3174400 | 2700 | |
| 2092879 | HuaNaaFC | E | Sept. 3, 2012, 12:32 p.m. | OK | Java 6 | TESTS | 131 | 420 | 45056000 | 2700 | |
| 1646905 | mmaxio | E | May 1, 2012, 12:50 a.m. | OK | Java 7 | TESTS | 131 | 440 | 44953600 | 2700 | |
| 1851030 | ProCoder | E | July 3, 2012, 9:20 a.m. | OK | Java 7 | TESTS | 131 | 450 | 45056000 | 2700 | |
| 2068129 | stet | E | Aug. 30, 2012, 3:51 a.m. | OK | Python 2 | TESTS | 131 | 2750 | 19456000 | 2700 |
Back to search problems