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 |
|---|---|---|---|---|---|---|
| 2052 | 2024-2025 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 42243884 | Dec. 15, 2024, 7:35 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 4215 ) | A | Adrenaline Rush | PROGRAMMING |
Alice's friend is a big fan of the Adrenaline Rush racing competition and always strives to attend every race. However, this time, Alice is the one watching the race. To ensure her friend does not miss any important details, Alice decides to take notes on everything that happens on the track. The first thing Alice notices before the race begins is the numbering of the cars. All the cars line up in front of the starting line in a specific order. The car closest to the line is numbered $$$1$$$, the second car is numbered $$$2$$$, and so on, up to the last car, which is numbered $$$n$$$. How convenient! — Alice thought. The race begins with the countdown: "Three! Two! One! Go!". Alice observes that the cars start in their original order. However, as the race progresses, their order changes. She records whenever one car overtakes another, essentially swapping places with it on the track. During the race, Alice notices something curious: no car overtakes another more than once. In other words, for any two cars $$$x$$$ and $$$y$$$, there are at most two overtakes between them during the race: "$$$x$$$ overtakes $$$y$$$" and/or "$$$y$$$ overtakes $$$x$$$". At the end of the race, Alice carefully writes down the final order of the cars $$$c_1, c_2, \ldots, c_n$$$, where $$$c_1$$$ represents the winner of the race. Alice's friend, however, is only interested in the final ranking and discards all of Alice's notes except for the final ordering. As Alice is quite curious, she wonders: What is the longest possible sequence of overtakes she could have observed during the race? Your task is to help Alice answer this question. The first line of the input contains a single integer $$$n\;(1 \le n \le 1000)$$$ — the number of cars in the race. The second line contains a permutation $$$c_1, c_2, \ldots, c_n\;(1 \le c_i \le n, c_i \ne c_j)$$$ — the final order of the cars. The first line of the output should contain a single integer $$$m$$$ — the maximum possible number of ove |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 296542284 | og.kostya | A | Dec. 15, 2024, 9:25 a.m. | OK | C# 10 | TESTS | 54 | 202 | 23347200 | ||
| 296579408 | HoneyGupta | A | Dec. 15, 2024, 2:07 p.m. | OK | C++17 (GCC 7-32) | TESTS | 54 | 187 | 8908800 | ||
| 296554943 | hgcnxn | A | Dec. 15, 2024, 10:51 a.m. | OK | C++17 (GCC 7-32) | TESTS | 54 | 202 | 8908800 | ||
| 296532739 | mahir1 BunnyWarlock | A | Dec. 15, 2024, 8:24 a.m. | OK | C++17 (GCC 7-32) | TESTS | 54 | 202 | 8908800 | ||
| 296573656 | tw107y | A | Dec. 15, 2024, 1:15 p.m. | OK | C++17 (GCC 7-32) | TESTS | 54 | 202 | 9011200 | ||
| 296530299 | nguyenkhacthu violee thiennhan10 | A | Dec. 15, 2024, 8:04 a.m. | OK | C++17 (GCC 7-32) | TESTS | 54 | 202 | 11161600 | ||
| 296538169 | abhinav4279 | A | Dec. 15, 2024, 9:01 a.m. | OK | C++17 (GCC 7-32) | TESTS | 54 | 217 | 9011200 | ||
| 296537482 | Teamangay mounteverest2004 Spad2e | A | Dec. 15, 2024, 8:55 a.m. | OK | C++17 (GCC 7-32) | TESTS | 54 | 217 | 9011200 | ||
| 296530827 | bnxcvd Black_King1 | A | Dec. 15, 2024, 8:08 a.m. | OK | C++17 (GCC 7-32) | TESTS | 54 | 218 | 8089600 | ||
| 296537687 | Teamangay mounteverest2004 Spad2e | A | Dec. 15, 2024, 8:57 a.m. | OK | C++17 (GCC 7-32) | TESTS | 54 | 218 | 8908800 | ||
| 296556705 | _Faineant | A | Dec. 15, 2024, 11:08 a.m. | OK | C++17 (GCC 7-32) | TESTS | 54 | 218 | 9011200 | ||
| 296572883 | maspy | A | Dec. 15, 2024, 1:08 p.m. | OK | C++20 (GCC 13-64) | TESTS | 54 | 93 | 22835200 | ||
| 296773760 | Amaciyuo | A | Dec. 15, 2024, 9:46 p.m. | OK | C++20 (GCC 13-64) | TESTS | 54 | 109 | 10137600 | ||
| 296537657 | ilseoresivee | A | Dec. 15, 2024, 8:57 a.m. | OK | C++20 (GCC 13-64) | TESTS | 54 | 124 | 9932800 | ||
| 296523438 | sheercold Sid0309 Codula | A | Dec. 15, 2024, 7:49 a.m. | OK | C++20 (GCC 13-64) | TESTS | 54 | 124 | 10035200 | ||
| 296531347 | pajju04 | A | Dec. 15, 2024, 8:12 a.m. | OK | C++20 (GCC 13-64) | TESTS | 54 | 125 | 10035200 | ||
| 296530466 | ali2005_syr Mohammad_Hacker | A | Dec. 15, 2024, 8:05 a.m. | OK | C++20 (GCC 13-64) | TESTS | 54 | 139 | 10035200 | ||
| 296523979 | Frost_Ice wifi32767 satorimarch | A | Dec. 15, 2024, 7:54 a.m. | OK | C++20 (GCC 13-64) | TESTS | 54 | 139 | 10035200 | ||
| 296542799 | abdelrhmanezzat NourEldinAhmed K_sakkary | A | Dec. 15, 2024, 9:30 a.m. | OK | C++20 (GCC 13-64) | TESTS | 54 | 140 | 9830400 | ||
| 296560082 | aryak05 kkkk1234 nandhagk1729 | A | Dec. 15, 2024, 11:40 a.m. | OK | C++20 (GCC 13-64) | TESTS | 54 | 140 | 10035200 | ||
| 296555699 | thabumi | A | Dec. 15, 2024, 10:58 a.m. | OK | C++20 (GCC 13-64) | TESTS | 54 | 140 | 10035200 | ||
| 296536608 | 625005105 | A | Dec. 15, 2024, 8:48 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 54 | 139 | 11673600 | ||
| 296540052 | Srginit286 | A | Dec. 15, 2024, 9:18 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 54 | 140 | 10137600 | ||
| 296524379 | DragosCB MVB | A | Dec. 15, 2024, 7:58 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 54 | 140 | 10137600 | ||
| 296524021 | YipChip Woxuanyi | A | Dec. 15, 2024, 7:54 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 54 | 140 | 24166400 | ||
| 296532865 | ArminAzimi Mohammad.H915 parsa333111 | A | Dec. 15, 2024, 8:25 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 54 | 155 | 10035200 | ||
| 296523787 | Sofapuden Temmie | A | Dec. 15, 2024, 7:52 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 54 | 155 | 10137600 | ||
| 296523237 | tranquility nikgaevoy Kaban-5 | A | Dec. 15, 2024, 7:47 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 54 | 155 | 10137600 | ||
| 296776653 | kolomig0r | A | Dec. 15, 2024, 10:53 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 54 | 156 | 10137600 | ||
| 296747340 | Zeyush | A | Dec. 15, 2024, 4:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 54 | 156 | 10137600 | ||
| 296578546 | convective_rain | A | Dec. 15, 2024, 1:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 54 | 156 | 10137600 | ||
| 296542171 | kamranm | A | Dec. 15, 2024, 9:24 a.m. | OK | Java 8 | TESTS | 54 | 499 | 224256000 | ||
| 296532174 | samarthbellam | A | Dec. 15, 2024, 8:19 a.m. | OK | PyPy 3 | TESTS | 54 | 1765 | 101990400 | ||
| 296545652 | DenisVistunov | A | Dec. 15, 2024, 9:59 a.m. | OK | PyPy 3-64 | TESTS | 54 | 406 | 75264000 | ||
| 296560301 | AthJa | A | Dec. 15, 2024, 11:42 a.m. | OK | PyPy 3-64 | TESTS | 54 | 436 | 82329600 | ||
| 296542050 | Pi213 | A | Dec. 15, 2024, 9:23 a.m. | OK | PyPy 3-64 | TESTS | 54 | 452 | 10342400 | ||
| 296530519 | FekoKarels | A | Dec. 15, 2024, 8:06 a.m. | OK | PyPy 3-64 | TESTS | 54 | 499 | 74956800 | ||
| 296544048 | allllokk | A | Dec. 15, 2024, 9:42 a.m. | OK | PyPy 3-64 | TESTS | 54 | 499 | 82944000 | ||
| 296545660 | joshthoo keyansheng | A | Dec. 15, 2024, 9:59 a.m. | OK | PyPy 3-64 | TESTS | 54 | 593 | 40550400 | ||
| 296558243 | Papanya Sabdikay Mrkeroch15 | A | Dec. 15, 2024, 11:23 a.m. | OK | PyPy 3-64 | TESTS | 54 | 749 | 77209600 | ||
| 296537699 | Leo25Darklight debjit81 GryllsP | A | Dec. 15, 2024, 8:57 a.m. | OK | PyPy 3-64 | TESTS | 54 | 749 | 78848000 | ||
| 296570904 | hofung614 | A | Dec. 15, 2024, 12:52 p.m. | OK | PyPy 3-64 | TESTS | 54 | 750 | 77824000 | ||
| 296659871 | bogatrv | A | Dec. 15, 2024, 3:09 p.m. | OK | PyPy 3-64 | TESTS | 54 | 764 | 77926400 | ||
| 296553671 | Radiation444 serpentmillers429 Numberknight118 | A | Dec. 15, 2024, 10:37 a.m. | OK | Python 3 | TESTS | 54 | 1718 | 0 | ||
| 296787121 | qw23 | A | Dec. 16, 2024, 3:52 a.m. | OK | Python 3 | TESTS | 54 | 2108 | 97792000 | ||
| 296569222 | venkat2912 | A | Dec. 15, 2024, 12:36 p.m. | OK | Python 3 | TESTS | 54 | 2342 | 79564800 | ||
| 296523485 | freak93 | A | Dec. 15, 2024, 7:49 a.m. | OK | Rust 2021 | TESTS | 54 | 140 | 22630400 | ||
| 296531525 | Lord-scheme | A | Dec. 15, 2024, 8:14 a.m. | OK | Rust 2021 | TESTS | 54 | 187 | 22528000 | ||
| 296567635 | A | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567614 | A | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567613 | A | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567601 | A | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567583 | A | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567402 | A | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567332 | A | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567304 | A | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567291 | A | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567277 | A | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 |
Back to search problems