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 |
|---|---|---|---|---|---|---|
| 2232 | Codeforces Round 1101 (Div. 2) | FINISHED | False | 7200 | 2129131 | May 30, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 21791 ) | A | Convergence | PROGRAMMING | greedy sortings |
Alice is inviting her friends to a party to eat cakes. However, each friend may not be at the same place, so everyone has to meet up at the same location first. Alice has (n) friends, where the (i)-th friend is at position (a_i). To make everyone be at the same place, Alice has to make multiple group calls. Unfortunately, the signal is weak, and Alice can only call (2) other people at a time. Being a good person, Alice doesn't want her friends to walk too far. So, for each group call containing the (i)-th friend and the (j)-th friend, Alice will tell both of them to meet at some integer location between (\min(a_i, a_j)) and (\max(a_i, a_j)) inclusive. After that, both of them will move to that location so quickly that Alice cannot make any group call during their movement. Please note that Alice can call these friends again once they reach that location. The party is starting soon, so Alice needs to make group calls fast. Help her find the minimum number of group calls she needs to make. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 500)). The description of the test cases follows. The first line of each test case contains an integer (n) ((2 \leq n \leq 100)) — the number of friends Alice has. The second line of each test case contains (n) integers (a_1,a_2,\ldots,a_n) ((1 \leq a_i \leq 10^9)) — the locations of her friends. For each test case, output the minimum number of group calls she needs to make in order for all of her friends to be in the same location. In the first test case, the minimum number of group calls is 2. One way to make everyone at the same location is as follows: Call the (1)-st and (4)-th friend and tell them to move to location (3). Their locations are now (3, 2, 3, 3, 5). Call the (2)-nd and (5)-th friend and tell them to move to location (3). Their locations are now $$$[3, 3, 3, 3, 3 |
| Codeforces Round 1101 (Div. 2) — Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 376739410 | ObserveGolu | A | May 31, 2026, 4:48 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 15 | 0 | ||
| 376733401 | prachishandilya | A | May 31, 2026, 3:11 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 15 | 0 | ||
| 376711113 | krishyadaveee | A | May 30, 2026, 6:31 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 15 | 0 | ||
| 376708428 | chiragtyagi | A | May 30, 2026, 6:03 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 15 | 0 | ||
| 376708084 | Raju_Ahmed | A | May 30, 2026, 6 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 15 | 0 | ||
| 376708015 | ritsu7 | A | May 30, 2026, 5:59 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 15 | 0 | ||
| 376739764 | CosmicByte_1010 | A | May 31, 2026, 4:54 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 15 | 0 | ||
| 376706354 | Chronoss | A | May 30, 2026, 5:43 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 15 | 0 | ||
| 376705354 | lokitpatidar | A | May 30, 2026, 5:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 15 | 0 | ||
| 376690092 | muralidhar.suddhapalli | A | May 30, 2026, 4:08 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 15 | 0 | ||
| 376742456 | Tanishk... | A | May 31, 2026, 5:33 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 15 | 0 | ||
| 376742138 | cristinaoo1 | A | May 31, 2026, 5:29 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 15 | 0 | ||
| 376741422 | pandaC222 | A | May 31, 2026, 5:19 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 15 | 0 | ||
| 376733756 | mfaiz_1 | A | May 31, 2026, 3:19 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 15 | 0 | ||
| 376727046 | DumbLooser | A | May 31, 2026, 12:13 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 15 | 0 | ||
| 376719837 | Essam_Ahmed | A | May 30, 2026, 8:32 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 15 | 0 | ||
| 376709873 | the_maverick01 | A | May 30, 2026, 6:18 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 15 | 0 | ||
| 376709423 | kliiiiiiiiiiiiiiiiiiio | A | May 30, 2026, 6:14 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 15 | 0 | ||
| 376709340 | raunac | A | May 30, 2026, 6:13 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 15 | 0 | ||
| 376696341 | PG1211 | A | May 30, 2026, 4:22 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 15 | 0 | ||
| 376734811 | ompatel45672 | A | May 31, 2026, 3:41 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 15 | 0 | ||
| 376745375 | ModernSudama | A | May 31, 2026, 6:10 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 15 | 0 | ||
| 376745251 | perseverance92 | A | May 31, 2026, 6:08 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 15 | 0 | ||
| 376741990 | One_True | A | May 31, 2026, 5:27 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 15 | 0 | ||
| 376738070 | WhileTrueCryMore | A | May 31, 2026, 4:25 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 15 | 0 | ||
| 376736070 | Ak_m7uslim | A | May 31, 2026, 4:07 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 15 | 0 | ||
| 376735062 | dhr_you_v | A | May 31, 2026, 3:46 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 15 | 0 | ||
| 376734788 | .Alternate. | A | May 31, 2026, 3:41 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 15 | 0 | ||
| 376733856 | GP117 | A | May 31, 2026, 3:21 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 15 | 0 | ||
| 376730329 | its1noone | A | May 31, 2026, 2:07 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 15 | 0 | ||
| 376698017 | varta_man369 | A | May 30, 2026, 4:26 p.m. | OK | GNU C11 | TESTS | 4 | 0 | 0 | ||
| 376740321 | not_compiled | A | May 31, 2026, 5:03 a.m. | OK | GNU C11 | TESTS | 4 | 15 | 0 | ||
| 376706152 | Aisha_Bhaktani | A | May 30, 2026, 5:41 p.m. | OK | GNU C11 | TESTS | 4 | 15 | 0 | ||
| 376689782 | armoon | A | May 30, 2026, 4:07 p.m. | OK | GNU C11 | TESTS | 4 | 15 | 0 | ||
| 376692366 | ChrisCode_forces | A | May 30, 2026, 4:13 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 0 | ||
| 376690455 | Abhinav_1712 | A | May 30, 2026, 4:09 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 0 | ||
| 376690681 | virodh | A | May 30, 2026, 4:10 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 0 | ||
| 376701480 | Infinity.coder | A | May 30, 2026, 4:32 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 0 | ||
| 376699127 | Kryzen | A | May 30, 2026, 4:28 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 0 | ||
| 376698147 | MarioHugo | A | May 30, 2026, 4:26 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 0 | ||
| 376727284 | tilak.raj94 | A | May 31, 2026, 12:24 a.m. | OK | Go | TESTS | 4 | 31 | 1433600 | ||
| 376722081 | pulsarchief | A | May 30, 2026, 9:18 p.m. | OK | Java 21 | TESTS | 4 | 156 | 0 | ||
| 376727776 | breno_st | A | May 31, 2026, 12:45 a.m. | OK | Java 21 | TESTS | 4 | 171 | 307200 | ||
| 376734234 | Qzer | A | May 31, 2026, 3:29 a.m. | OK | Java 21 | TESTS | 4 | 187 | 0 | ||
| 376713949 | ndwcillz | A | May 30, 2026, 6:58 p.m. | OK | Java 21 | TESTS | 4 | 187 | 0 | ||
| 376710838 | Devstudent01 | A | May 30, 2026, 6:28 p.m. | OK | Java 21 | TESTS | 4 | 187 | 0 | ||
| 376690623 | Devstudent01 | A | May 30, 2026, 4:09 p.m. | OK | Java 21 | TESTS | 4 | 187 | 0 | ||
| 376714681 | wtf_utkarsh | A | May 30, 2026, 7:09 p.m. | OK | Java 21 | TESTS | 4 | 187 | 102400 | ||
| 376695528 | krishbhatia026 | A | May 30, 2026, 4:20 p.m. | OK | Java 21 | TESTS | 4 | 187 | 102400 | ||
| 376704777 | gupta_harshal | A | May 30, 2026, 5:27 p.m. | OK | Java 21 | TESTS | 4 | 187 | 409600 | ||
| 376714187 | Jiyan0207 | A | May 30, 2026, 7:02 p.m. | OK | Java 21 | TESTS | 4 | 187 | 512000 | ||
| 376723795 | YashNahata | A | May 30, 2026, 10:04 p.m. | OK | Java 8 | TESTS | 4 | 109 | 0 | ||
| 376714811 | Swara546 | A | May 30, 2026, 7:11 p.m. | OK | Java 8 | TESTS | 4 | 156 | 0 | ||
| 376714785 | desi_patola | A | May 30, 2026, 7:10 p.m. | OK | Java 8 | TESTS | 4 | 187 | 0 | ||
| 376722947 | Kolya | A | May 30, 2026, 9:39 p.m. | OK | PyPy 3 | TESTS | 4 | 156 | 6144000 | ||
| 376725622 | rafaelguasselli | A | May 30, 2026, 11:11 p.m. | OK | PyPy 3 | TESTS | 4 | 156 | 6553600 | ||
| 376695580 | Igelschnaeuzchen | A | May 30, 2026, 4:20 p.m. | OK | PyPy 3 | TESTS | 4 | 171 | 6553600 | ||
| 376705199 | Alexnusbb | A | May 30, 2026, 5:31 p.m. | OK | PyPy 3 | TESTS | 4 | 187 | 6144000 | ||
| 376743856 | mega_bot | A | May 31, 2026, 5:51 a.m. | OK | PyPy 3 | TESTS | 4 | 187 | 6656000 | ||
| 376742770 | adikowa | A | May 31, 2026, 5:37 a.m. | OK | PyPy 3 | TESTS | 4 | 203 | 7270400 | ||
| 376692651 | akhil.palepally1 | A | May 30, 2026, 4:14 p.m. | OK | PyPy 3 | TESTS | 4 | 234 | 8294400 | ||
| 376698051 | shivikasingh3004 | A | May 30, 2026, 4:26 p.m. | OK | PyPy 3 | TESTS | 4 | 406 | 9728000 | ||
| 376709163 | is-this-Minio | A | May 30, 2026, 6:11 p.m. | OK | PyPy 3 | TESTS | 4 | 453 | 9523200 | ||
| 376696859 | cml2 | A | May 30, 2026, 4:23 p.m. | OK | PyPy 3-64 | TESTS | 4 | 62 | 1843200 | ||
| 376734966 | opankit | A | May 31, 2026, 3:44 a.m. | OK | PyPy 3-64 | TESTS | 4 | 62 | 2457600 | ||
| 376697539 | Intender | A | May 30, 2026, 4:24 p.m. | OK | PyPy 3-64 | TESTS | 4 | 62 | 2560000 | ||
| 376731929 | ctrl--akshit | A | May 31, 2026, 2:44 a.m. | OK | PyPy 3-64 | TESTS | 4 | 62 | 3072000 | ||
| 376723818 | houssem02 | A | May 30, 2026, 10:04 p.m. | OK | PyPy 3-64 | TESTS | 4 | 62 | 3481600 | ||
| 376739620 | Axom34 | A | May 31, 2026, 4:51 a.m. | OK | PyPy 3-64 | TESTS | 4 | 62 | 5120000 | ||
| 376716043 | porkBarrel | A | May 30, 2026, 7:29 p.m. | OK | PyPy 3-64 | TESTS | 4 | 78 | 1740800 | ||
| 376741826 | byreddydinesh45 | A | May 31, 2026, 5:24 a.m. | OK | PyPy 3-64 | TESTS | 4 | 78 | 1843200 | ||
| 376707194 | a2e | A | May 30, 2026, 5:51 p.m. | OK | PyPy 3-64 | TESTS | 4 | 78 | 1945600 | ||
| 376739627 | yashvardhanrajpoot1 | A | May 31, 2026, 4:51 a.m. | OK | PyPy 3-64 | TESTS | 4 | 78 | 2560000 | ||
| 376716164 | CosmicGallant | A | May 30, 2026, 7:30 p.m. | OK | Python 3 | TESTS | 4 | 31 | 307200 | ||
| 376690042 | cheburascha01 | A | May 30, 2026, 4:08 p.m. | OK | Python 3 | TESTS | 4 | 46 | 102400 | ||
| 376709315 | Sriramcn | A | May 30, 2026, 6:13 p.m. | OK | Python 3 | TESTS | 4 | 46 | 204800 | ||
| 376736543 | gooonn | A | May 31, 2026, 4:16 a.m. | OK | Python 3 | TESTS | 4 | 46 | 1024000 | ||
| 376727282 | chmpro | A | May 31, 2026, 12:23 a.m. | OK | Python 3 | TESTS | 4 | 46 | 1024000 | ||
| 376709180 | dip789 | A | May 30, 2026, 6:11 p.m. | OK | Python 3 | TESTS | 4 | 46 | 4198400 | ||
| 376717227 | rapplayerr | A | May 30, 2026, 7:46 p.m. | OK | Python 3 | TESTS | 4 | 46 | 4710400 | ||
| 376726967 | huyphan1311 | A | May 31, 2026, 12:10 a.m. | OK | Python 3 | TESTS | 4 | 62 | 204800 | ||
| 376705596 | shewalepranav66 | A | May 30, 2026, 5:35 p.m. | OK | Python 3 | TESTS | 4 | 62 | 204800 | ||
| 376692420 | ravi.Nyadav | A | May 30, 2026, 4:13 p.m. | OK | Python 3 | TESTS | 4 | 62 | 204800 | ||
| 376706718 | Tantellam | A | May 30, 2026, 5:47 p.m. | OK | Rust 2024 | TESTS | 4 | 31 | 11776000 |
Back to search problems