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 |
|---|---|---|---|---|---|---|
| 2068 | European Championship 2025 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 35580284 | March 2, 2025, 10:35 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 205 ) | K | Amusement Park Rides | PROGRAMMING | flows graphs |
Ivan, Dmitrii, and Pjotr are celebrating Ivan's birthday at an amusement park with (n) attractions. The (i)-th attraction operates at minutes (a_i, 2a_i, 3a_i, \dots) (i.e., every (a_i) minutes). Each minute, the friends can either ride exactly one available attraction together or wait. Since the rides are very short, they can board another attraction the next minute. They may ride the attractions in any order. They want to experience each ride exactly once before heading off to enjoy the birthday cake. What is the earliest time by which they can finish all (n) attractions? Each test contains multiple test cases. The first line contains an integer (t) ((1\le t\le 2000)) — the number of test cases. The descriptions of the (t) test cases follow. The first line contains an integer (n) ((1\le n \le 2000)) — the number of attractions. The second line contains (n) integers (a_1,\, a_2,\,\ldots,\, a_n) ((1 \le a_i \le 10^9)) — the values determining when the various attractions operate. It is guaranteed that the sum of (n) over all test cases does not exceed (2000). For each test case, print the earliest time the three friends can finish all (n) attractions. In the first test case , the three friends can ride the (i)-th attraction at the (i)-th minute. Since there are (4) attractions, they need (4) minutes to ride them all. In the third test case , the three friends can ride the attractions in order at minutes (1,\, 2,\, 3,\, 4,\, 6,\, 8) respectively. Therefore, they can ride all attractions in (8) minutes. One can show that it is impossible to finish all the attractions earlier. |
| 140239 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 308741589 | Marco_L_T | K | March 3, 2025, 5:31 a.m. | OK | C++17 (GCC 7-32) | TESTS | 38 | 390 | 3379200 | ||
| 308741418 | Marco_L_T | K | March 3, 2025, 5:28 a.m. | OK | C++17 (GCC 7-32) | TESTS | 38 | 452 | 32972800 | ||
| 308726012 | TadijaSebez | K | March 3, 2025, 12:46 a.m. | OK | C++17 (GCC 7-32) | TESTS | 38 | 484 | 102400 | ||
| 308702731 | ay1357 | K | March 2, 2025, 7:30 p.m. | OK | C++17 (GCC 7-32) | TESTS | 38 | 812 | 165785600 | ||
| 308734202 | AghaTizi | K | March 3, 2025, 3:45 a.m. | OK | C++17 (GCC 7-32) | TESTS | 38 | 1061 | 102400 | ||
| 308664214 | Barichek | K | March 2, 2025, 2:06 p.m. | OK | C++17 (GCC 7-32) | TESTS | 36 | 1921 | 210227200 | ||
| 308688875 | YeongTree | K | March 2, 2025, 5:17 p.m. | OK | C++20 (GCC 13-64) | TESTS | 38 | 108 | 102400 | ||
| 308668731 | Xun_Xiaoyao crazy_sea dXqwq | K | March 2, 2025, 2:39 p.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 156 | 361369600 | ||
| 308709268 | DaviHenrique brenner1 jackson.souza | K | March 2, 2025, 8:29 p.m. | OK | C++20 (GCC 13-64) | TESTS | 38 | 499 | 409600 | ||
| 308701577 | VinnySJ | K | March 2, 2025, 7:18 p.m. | OK | C++20 (GCC 13-64) | TESTS | 38 | 561 | 5632000 | ||
| 308659774 | tourist | K | March 2, 2025, 1:35 p.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 608 | 217088000 | ||
| 308690434 | VinnySJ | K | March 2, 2025, 5:31 p.m. | OK | C++20 (GCC 13-64) | TESTS | 38 | 703 | 6041600 | ||
| 308723332 | Sparkle_Twilight | K | March 3, 2025, 12:04 a.m. | OK | C++20 (GCC 13-64) | TESTS | 38 | 749 | 276172800 | ||
| 308718081 | MvKaio | K | March 2, 2025, 10:16 p.m. | OK | C++20 (GCC 13-64) | TESTS | 38 | 781 | 276275200 | ||
| 308716287 | MvKaio | K | March 2, 2025, 9:47 p.m. | OK | C++20 (GCC 13-64) | TESTS | 38 | 1187 | 3686400 | ||
| 308690276 | VinnySJ | K | March 2, 2025, 5:30 p.m. | OK | C++20 (GCC 13-64) | TESTS | 38 | 1421 | 14438400 | ||
| 308718055 | Anonymous_Noob | K | March 2, 2025, 10:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 38 | 171 | 102400 | ||
| 308718018 | Anonymous_Noob | K | March 2, 2025, 10:15 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 38 | 187 | 102400 | ||
| 308658380 | Puranya shiomusubi496 MtSaka | K | March 2, 2025, 1:25 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 36 | 202 | 409600 | ||
| 308670083 | czwz esrever lnsuyn | K | March 2, 2025, 2:50 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 36 | 281 | 102400 | ||
| 308666884 | hos.lyric maspy maroonrk | K | March 2, 2025, 2:26 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 36 | 562 | 126464000 | ||
| 308676143 | superguymj | K | March 2, 2025, 3:37 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 36 | 843 | 459571200 | ||
| 308662827 | 244mhq antontrygubO_o | K | March 2, 2025, 1:56 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 36 | 983 | 159641600 | ||
| 308661080 | jiangly | K | March 2, 2025, 1:44 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 36 | 984 | 62771200 | ||
| 308654504 | LeoPro fastmath turmax | K | March 2, 2025, 12:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 36 | 1109 | 80281600 | ||
| 308649959 | Farhod | K | March 2, 2025, 12:23 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 36 | 1468 | 98099200 |
Back to search problems