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 | 35493923 | March 2, 2025, 10:35 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 1601 ) | J | The Ultimate Wine Tasting Event | PROGRAMMING | combinatorics greedy |
Rumors of the excellence of Gabriella's wine tasting events have toured the world and made it to the headlines of prestigious wine magazines. Now, she has been asked to organize an event at the EUC 2025! This time she selected (2n) bottles of wine, of which exactly (n) are of white wine, and exactly (n) of red wine. She arranged them in a line as usual, in a predetermined order described by a string (s) of length (2n): for (1 \le i \le 2n), the (i)-th bottle from the left is white wine if (s_i = W) and red wine if (s_i = R). To spice things up for the attendees (which include EUC contestants), Gabriella came up with the following wine-themed problem: Consider a way of dividing the (2n) bottles into two disjoint subsets, each containing (n) bottles. Then, for every (1 \le i \le n), swap the (i)-th bottle in the first subset (from the left) and the (i)-th bottle of the second subset (also from the left). Is it possible to choose the subsets so that, after this operation is done exactly once, the white wines occupy the first (n) positions? The first line contains an integer (t) ((1 \le t \le 500)) — the number of test cases. The descriptions of the (t) test cases follow. The first line of each test case contains an integer (n) ((1 \le n \le 100)) — where (2n) is the total number of bottles. The second line of each test case contains a string (s) of length (2n), describing the bottle arrangement — the (i)-th character of (s) ((1 \le i \le 2n)) is (W) for a white wine and (R) for a red wine. It is guaranteed that (s) contains exactly (n) (W)'s and (n) (R)'s. For each test case, print (YES) if it is possible to divide the bottles as explained in the statement. Otherwise, print (NO). In the first test case , we can make one subset out of the bottles at po |
| 140239 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 308695496 | Aryan_007 | J | March 2, 2025, 6:17 p.m. | OK | C++17 (GCC 7-32) | TESTS | 8 | 46 | 0 | ||
| 308641983 | TyroWhizz Teja-Smart | J | March 2, 2025, 11:28 a.m. | OK | C++17 (GCC 7-32) | TESTS | 8 | 46 | 0 | ||
| 308703120 | cricrazy_001 | J | March 2, 2025, 7:34 p.m. | OK | C++17 (GCC 7-32) | TESTS | 8 | 46 | 102400 | ||
| 308688894 | __orz__ | J | March 2, 2025, 5:17 p.m. | OK | C++17 (GCC 7-32) | TESTS | 8 | 46 | 102400 | ||
| 308662648 | enratingion PeruvianCartel khanhdungtrinh | J | March 2, 2025, 1:55 p.m. | OK | C++17 (GCC 7-32) | TESTS | 8 | 46 | 102400 | ||
| 308658316 | HungLPdz whtth HelloWorld1311 | J | March 2, 2025, 1:25 p.m. | OK | C++17 (GCC 7-32) | TESTS | 8 | 46 | 102400 | ||
| 308654569 | nick.chang30584164 Est. sean123xyz | J | March 2, 2025, 12:59 p.m. | OK | C++17 (GCC 7-32) | TESTS | 8 | 46 | 102400 | ||
| 308650211 | BaiLi_nya | J | March 2, 2025, 12:25 p.m. | OK | C++17 (GCC 7-32) | TESTS | 8 | 46 | 102400 | ||
| 308648107 | MintBruce lollospadalaser | J | March 2, 2025, 12:09 p.m. | OK | C++17 (GCC 7-32) | TESTS | 8 | 46 | 102400 | ||
| 308644410 | melharucos123 | J | March 2, 2025, 11:43 a.m. | OK | C++17 (GCC 7-32) | TESTS | 8 | 46 | 102400 | ||
| 308641259 | Puranya shiomusubi496 MtSaka | J | March 2, 2025, 11:23 a.m. | OK | C++20 (GCC 13-64) | TESTS | 8 | 31 | 716800 | ||
| 308724766 | h354222857 | J | March 3, 2025, 12:22 a.m. | OK | C++20 (GCC 13-64) | TESTS | 8 | 46 | 0 | ||
| 308719894 | Benq | J | March 2, 2025, 10:50 p.m. | OK | C++20 (GCC 13-64) | TESTS | 8 | 46 | 0 | ||
| 308694057 | sai-17 | J | March 2, 2025, 6:04 p.m. | OK | C++20 (GCC 13-64) | TESTS | 8 | 46 | 0 | ||
| 308694037 | Soumyadip_Das-Mahapatra | J | March 2, 2025, 6:03 p.m. | OK | C++20 (GCC 13-64) | TESTS | 8 | 46 | 0 | ||
| 308692047 | Bimbeso | J | March 2, 2025, 5:45 p.m. | OK | C++20 (GCC 13-64) | TESTS | 8 | 46 | 0 | ||
| 308682739 | Chen_HaiBing | J | March 2, 2025, 4:19 p.m. | OK | C++20 (GCC 13-64) | TESTS | 8 | 46 | 0 | ||
| 308667920 | LikeScience | J | March 2, 2025, 2:34 p.m. | OK | C++20 (GCC 13-64) | TESTS | 8 | 46 | 0 | ||
| 308662826 | Uakkes xksark Tobzhan | J | March 2, 2025, 1:56 p.m. | OK | C++20 (GCC 13-64) | TESTS | 8 | 46 | 0 | ||
| 308662628 | EternalMangekyo subconsciousmind1 _gajju | J | March 2, 2025, 1:55 p.m. | OK | C++20 (GCC 13-64) | TESTS | 8 | 46 | 0 | ||
| 308740716 | OMI_14 | J | March 3, 2025, 5:16 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 8 | 46 | 0 | ||
| 308732355 | ncstzsx | J | March 3, 2025, 3:15 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 8 | 46 | 0 | ||
| 308727504 | ltdsword | J | March 3, 2025, 1:19 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 8 | 46 | 0 | ||
| 308713208 | CacheMe | J | March 2, 2025, 9:10 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 8 | 46 | 0 | ||
| 308700096 | madlogic | J | March 2, 2025, 7:04 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 8 | 46 | 0 | ||
| 308698820 | Ibrahimfostok | J | March 2, 2025, 6:51 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 8 | 46 | 0 | ||
| 308695035 | mohit_jaiswal | J | March 2, 2025, 6:13 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 8 | 46 | 0 | ||
| 308693671 | Malhar_17 | J | March 2, 2025, 6 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 8 | 46 | 0 | ||
| 308689544 | dotniiko | J | March 2, 2025, 5:23 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 8 | 46 | 0 | ||
| 308681079 | don_2004 | J | March 2, 2025, 4:02 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 8 | 46 | 0 | ||
| 308712837 | NenadDapic | J | March 2, 2025, 9:06 p.m. | OK | FPC | TESTS | 8 | 46 | 0 | ||
| 308660537 | 1435730 | J | March 2, 2025, 1:40 p.m. | OK | GNU C11 | TESTS | 8 | 46 | 102400 | ||
| 308671256 | Enderbrine16 danninx type5coding | J | March 2, 2025, 2:59 p.m. | OK | Java 21 | TESTS | 8 | 327 | 1433600 | ||
| 308695487 | AghaTizi klein199 Tlatoani | J | March 2, 2025, 6:17 p.m. | OK | Kotlin 1.9 | TESTS | 8 | 171 | 0 | ||
| 308640841 | arvindf232 Noam527 errorgorn | J | March 2, 2025, 11:20 a.m. | OK | Kotlin 1.9 | TESTS | 8 | 171 | 0 | ||
| 308648542 | nikoro256 loop0919 harurun4635 | J | March 2, 2025, 12:12 p.m. | OK | PyPy 3-64 | TESTS | 8 | 77 | 1331200 | ||
| 308642996 | MongHwa 987 | J | March 2, 2025, 11:34 a.m. | OK | PyPy 3-64 | TESTS | 8 | 93 | 2252800 | ||
| 308705632 | golomb RobertYL canine | J | March 2, 2025, 8:02 p.m. | OK | PyPy 3-64 | TESTS | 8 | 108 | 1433600 | ||
| 308699660 | FANAT_MORGENSHTERNA TychoElling onestig | J | March 2, 2025, 7 p.m. | OK | PyPy 3-64 | TESTS | 8 | 140 | 4300800 | ||
| 308650224 | _twi_nami | J | March 2, 2025, 12:25 p.m. | OK | PyPy 3-64 | TESTS | 8 | 171 | 5120000 | ||
| 308664652 | CodaCoder | J | March 2, 2025, 2:09 p.m. | OK | Python 3 | TESTS | 8 | 77 | 0 | ||
| 308646637 | Maksim1744 | J | March 2, 2025, 11:58 a.m. | OK | Rust 2021 | TESTS | 8 | 62 | 102400 |
Back to search problems