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 |
|---|---|---|---|---|---|---|
| 2059 | Codeforces Round 1002 (Div. 2) | FINISHED | False | 7200 | 37898722 | Feb. 2, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 29089 ) | A | Milya and Two Arrays | PROGRAMMING | constructive algorithms greedy sortings |
An array is called good if for any element (x) that appears in this array, it holds that (x) appears at least twice in this array. For example, the arrays (1, 2, 1, 1, 2), (3, 3), and (1, 2, 4, 1, 2, 4) are good, while the arrays (1), (1, 2, 1), and (2, 3, 4, 4) are not good. Milya has two good arrays (a) and (b) of length (n). She can rearrange the elements in array (a) in any way. After that, she obtains an array (c) of length (n), where (c_i = a_i + b_i) ((1 \le i \le n)). Determine whether Milya can rearrange the elements in array (a) such that there are at least (3) distinct elements in array (c). Each test consists of multiple test cases. The first line contains a single integer (t) ((1 \le t \le 1000)) — the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer (n) ((3 \le n \le 50)) — the length of the arrays (a) and (b). The second line of each test case contains (n) integers (a_1, a_2, \ldots, a_n) ((1 \le a_i \le 10^9)) — the elements of the array (a). The third line of each test case contains (n) integers (b_1, b_2, \ldots, b_n) ((1 \le b_i \le 10^9)) — the elements of the array (b). For each test case, output («) YES (») (without quotes) if it is possible to obtain at least (3) distinct elements in array (c), and («) NO (») otherwise. You can output each letter in any case (for example, («) YES (»), («) Yes (»), («) yes (»), («) yEs (») will be recognized as a positive answer). In the first test case, you can swap the second and third elements. Then the array (a = 1, 1, 2, 2), (b = 1, 2, 1, 2), and then (c = 2, 3, 3, 4). In the second test case, you can leave the elements unchanged. Then (c = 2, 3, 4, 4, 3, 2). In the third test case, the array (a) wi |
| 139094 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 304349774 | ChinmayP07 | A | Feb. 4, 2025, 5:46 a.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 46 | 0 | ||
| 304342812 | cannizzarokun | A | Feb. 4, 2025, 4:12 a.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 46 | 0 | ||
| 304302301 | anubhavhajela4 | A | Feb. 3, 2025, 6:11 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 46 | 0 | ||
| 304299839 | demonicSoul99 | A | Feb. 3, 2025, 5:55 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 46 | 0 | ||
| 304291564 | SAVYAGOEL | A | Feb. 3, 2025, 5:03 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 46 | 0 | ||
| 304267677 | Al_Noman22 | A | Feb. 3, 2025, 2:34 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 46 | 0 | ||
| 304259493 | hnaciri- | A | Feb. 3, 2025, 1:47 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 46 | 0 | ||
| 304255544 | Shashank_Shekhar_0007 | A | Feb. 3, 2025, 1:24 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 46 | 0 | ||
| 304249398 | Never_ending_debugging | A | Feb. 3, 2025, 12:44 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 46 | 0 | ||
| 304244812 | neelammishra0277 | A | Feb. 3, 2025, 12:08 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 46 | 0 | ||
| 304351230 | BL4Z4R | A | Feb. 4, 2025, 6:02 a.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 46 | 0 | ||
| 304345280 | parafox21 | A | Feb. 4, 2025, 4:51 a.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 46 | 0 | ||
| 304338608 | Akshat_barnwal | A | Feb. 4, 2025, 2:58 a.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 46 | 0 | ||
| 304336899 | SIDG414 | A | Feb. 4, 2025, 2:22 a.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 46 | 0 | ||
| 304336535 | kyrie21z | A | Feb. 4, 2025, 2:15 a.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 46 | 0 | ||
| 304317948 | Rofyda_Elghadban | A | Feb. 3, 2025, 8:20 p.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 46 | 0 | ||
| 304317515 | HD2003 | A | Feb. 3, 2025, 8:16 p.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 46 | 0 | ||
| 304317137 | _Mauve_ | A | Feb. 3, 2025, 8:12 p.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 46 | 0 | ||
| 304315682 | Mohab_Mohammed7 | A | Feb. 3, 2025, 7:57 p.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 46 | 0 | ||
| 304301361 | janlitwim | A | Feb. 3, 2025, 6:05 p.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 46 | 0 | ||
| 304342868 | Haasl | A | Feb. 4, 2025, 4:13 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 6 | 46 | 0 | ||
| 304323351 | juniorcompressor | A | Feb. 3, 2025, 9:23 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 6 | 46 | 0 | ||
| 304307875 | Ibrar_Manihar | A | Feb. 3, 2025, 6:50 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 6 | 46 | 0 | ||
| 304292286 | vivi._27 | A | Feb. 3, 2025, 5:08 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 6 | 46 | 0 | ||
| 304266552 | Glitch-20 | A | Feb. 3, 2025, 2:28 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 6 | 46 | 0 | ||
| 304254227 | rishitverma | A | Feb. 3, 2025, 1:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 6 | 46 | 0 | ||
| 304246796 | UttamRai | A | Feb. 3, 2025, 12:24 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 6 | 46 | 0 | ||
| 304240998 | Dick007 | A | Feb. 3, 2025, 11:39 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 6 | 46 | 0 | ||
| 304240225 | Somefolk | A | Feb. 3, 2025, 11:33 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 6 | 46 | 0 | ||
| 304228405 | _kuragayala___ | A | Feb. 3, 2025, 9:57 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 6 | 46 | 0 | ||
| 304327500 | swseverance | A | Feb. 3, 2025, 10:32 p.m. | OK | GNU C11 | TESTS | 6 | 46 | 102400 | ||
| 304206216 | alfie22 | A | Feb. 3, 2025, 4:24 a.m. | OK | GNU C11 | TESTS | 6 | 46 | 102400 | ||
| 304323494 | zerojanuary | A | Feb. 3, 2025, 9:25 p.m. | OK | GNU C11 | TESTS | 6 | 61 | 102400 | ||
| 304234591 | anirudh2005 | A | Feb. 3, 2025, 10:49 a.m. | OK | GNU C11 | TESTS | 6 | 62 | 102400 | ||
| 304201094 | KrishaThakarar | A | Feb. 3, 2025, 3:06 a.m. | OK | GNU C11 | TESTS | 6 | 77 | 102400 | ||
| 304207074 | csfnb | A | Feb. 3, 2025, 4:36 a.m. | OK | GNU C11 | TESTS | 6 | 265 | 102400 | ||
| 304334219 | redoak | A | Feb. 4, 2025, 1:21 a.m. | OK | Go | TESTS | 6 | 77 | 1740800 | ||
| 304205974 | twoni | A | Feb. 3, 2025, 4:21 a.m. | OK | Go | TESTS | 6 | 734 | 4608000 | ||
| 304300641 | adiyash9599 | A | Feb. 3, 2025, 6:01 p.m. | OK | Java 21 | TESTS | 6 | 249 | 307200 | ||
| 304275491 | Dinesh_k40 | A | Feb. 3, 2025, 3:21 p.m. | OK | Java 21 | TESTS | 6 | 249 | 614400 | ||
| 304219548 | yashvardhan3 | A | Feb. 3, 2025, 8:45 a.m. | OK | Java 21 | TESTS | 6 | 249 | 819200 | ||
| 304200528 | Avid.Angler | A | Feb. 3, 2025, 2:55 a.m. | OK | Java 21 | TESTS | 6 | 250 | 819200 | ||
| 304210022 | _gazedbyhim_ | A | Feb. 3, 2025, 5:13 a.m. | OK | Java 21 | TESTS | 6 | 265 | 0 | ||
| 304337395 | aspgarv112 | A | Feb. 4, 2025, 2:33 a.m. | OK | Java 21 | TESTS | 6 | 265 | 409600 | ||
| 304305745 | qDis | A | Feb. 3, 2025, 6:34 p.m. | OK | Java 21 | TESTS | 6 | 265 | 716800 | ||
| 304211154 | _gazedbyhim_ | A | Feb. 3, 2025, 5:27 a.m. | OK | Java 21 | TESTS | 6 | 265 | 716800 | ||
| 304311653 | ParamRShah | A | Feb. 3, 2025, 7:21 p.m. | OK | Java 21 | TESTS | 6 | 265 | 1433600 | ||
| 304209671 | _gazedbyhim_ | A | Feb. 3, 2025, 5:09 a.m. | OK | Java 21 | TESTS | 6 | 280 | 204800 | ||
| 304246295 | .diplo__mat | A | Feb. 3, 2025, 12:19 p.m. | OK | Java 8 | TESTS | 6 | 171 | 0 | ||
| 304294128 | 2manas1 | A | Feb. 3, 2025, 5:20 p.m. | OK | Java 8 | TESTS | 6 | 187 | 0 | ||
| 304216089 | CipherSphinx_Raj | A | Feb. 3, 2025, 8:08 a.m. | OK | Java 8 | TESTS | 6 | 187 | 39321600 | ||
| 304205583 | Mr_A | A | Feb. 3, 2025, 4:15 a.m. | OK | Java 8 | TESTS | 6 | 280 | 0 | ||
| 304180717 | MAGNUS_KALICHARAN | A | Feb. 2, 2025, 8:36 p.m. | OK | Java 8 | TESTS | 6 | 280 | 0 | ||
| 304299800 | yashbansal1 | A | Feb. 3, 2025, 5:55 p.m. | OK | Java 8 | TESTS | 6 | 281 | 0 | ||
| 304200311 | Sarvesh6477 | A | Feb. 3, 2025, 2:50 a.m. | OK | Java 8 | TESTS | 6 | 281 | 0 | ||
| 304337640 | Aditya_kale | A | Feb. 4, 2025, 2:38 a.m. | OK | Java 8 | TESTS | 6 | 296 | 0 | ||
| 304256376 | 123thirumal | A | Feb. 3, 2025, 1:29 p.m. | OK | Java 8 | TESTS | 6 | 296 | 0 | ||
| 304235254 | pratapsinghnikhil757 | A | Feb. 3, 2025, 10:55 a.m. | OK | Java 8 | TESTS | 6 | 296 | 0 | ||
| 304336959 | Strike117 | A | Feb. 4, 2025, 2:24 a.m. | OK | JavaScript | TESTS | 6 | 61 | 1536000 | ||
| 304244145 | Seonggwon | A | Feb. 3, 2025, 12:03 p.m. | OK | Kotlin 1.9 | TESTS | 6 | 249 | 204800 | ||
| 304303037 | velpurinagasai | A | Feb. 3, 2025, 6:15 p.m. | OK | PyPy 3 | TESTS | 6 | 171 | 4096000 | ||
| 304180171 | diveshuttam | A | Feb. 2, 2025, 8:30 p.m. | OK | PyPy 3 | TESTS | 6 | 171 | 10035200 | ||
| 304232158 | chef_gladiator | A | Feb. 3, 2025, 10:28 a.m. | OK | PyPy 3 | TESTS | 6 | 218 | 7065600 | ||
| 304241252 | qannat | A | Feb. 3, 2025, 11:41 a.m. | OK | PyPy 3 | TESTS | 6 | 234 | 6860800 | ||
| 304280168 | feelme | A | Feb. 3, 2025, 3:48 p.m. | OK | PyPy 3 | TESTS | 6 | 234 | 7065600 | ||
| 304288123 | samarthbellam | A | Feb. 3, 2025, 4:41 p.m. | OK | PyPy 3 | TESTS | 6 | 264 | 7168000 | ||
| 304223610 | GeoMetrix123 | A | Feb. 3, 2025, 9:19 a.m. | OK | PyPy 3 | TESTS | 6 | 265 | 7065600 | ||
| 304311732 | Asianboy69 | A | Feb. 3, 2025, 7:21 p.m. | OK | PyPy 3 | TESTS | 6 | 280 | 6758400 | ||
| 304270237 | Code.Virtuoso | A | Feb. 3, 2025, 2:48 p.m. | OK | PyPy 3 | TESTS | 6 | 280 | 7168000 | ||
| 304318737 | nakmuay007 | A | Feb. 3, 2025, 8:29 p.m. | OK | PyPy 3 | TESTS | 6 | 281 | 7475200 | ||
| 304318924 | MdAbedin | A | Feb. 3, 2025, 8:31 p.m. | OK | PyPy 3-64 | TESTS | 6 | 93 | 2867200 | ||
| 304246368 | Amarnath0038 | A | Feb. 3, 2025, 12:20 p.m. | OK | PyPy 3-64 | TESTS | 6 | 93 | 3379200 | ||
| 304215758 | pars_solis | A | Feb. 3, 2025, 8:04 a.m. | OK | PyPy 3-64 | TESTS | 6 | 108 | 9932800 | ||
| 304286417 | anaghninja432 | A | Feb. 3, 2025, 4:30 p.m. | OK | PyPy 3-64 | TESTS | 6 | 109 | 2048000 | ||
| 304303884 | AnkitRusia | A | Feb. 3, 2025, 6:21 p.m. | OK | PyPy 3-64 | TESTS | 6 | 109 | 2150400 | ||
| 304236865 | abenezer_m54 | A | Feb. 3, 2025, 11:07 a.m. | OK | PyPy 3-64 | TESTS | 6 | 109 | 3788800 | ||
| 304224213 | monocrap | A | Feb. 3, 2025, 9:24 a.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 2355200 | ||
| 304234951 | ChillCpGuy | A | Feb. 3, 2025, 10:52 a.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 3584000 | ||
| 304185053 | lukinalexey | A | Feb. 2, 2025, 9:31 p.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 3788800 | ||
| 304210216 | varunketa | A | Feb. 3, 2025, 5:16 a.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 3993600 | ||
| 304211972 | setliu22 | A | Feb. 3, 2025, 5:36 a.m. | OK | Python 3 | TESTS | 6 | 62 | 0 | ||
| 304344086 | sairamnst | A | Feb. 4, 2025, 4:32 a.m. | OK | Python 3 | TESTS | 6 | 77 | 0 | ||
| 304331423 | uramekus | A | Feb. 4, 2025, 12:10 a.m. | OK | Python 3 | TESTS | 6 | 77 | 0 | ||
| 304259036 | yyw233 | A | Feb. 3, 2025, 1:45 p.m. | OK | Python 3 | TESTS | 6 | 77 | 0 | ||
| 304258833 | ss_oku | A | Feb. 3, 2025, 1:43 p.m. | OK | Python 3 | TESTS | 6 | 77 | 0 | ||
| 304255497 | Abhishek_Dhamshetty_99 | A | Feb. 3, 2025, 1:24 p.m. | OK | Python 3 | TESTS | 6 | 77 | 0 | ||
| 304248704 | HideBeyondYou | A | Feb. 3, 2025, 12:38 p.m. | OK | Python 3 | TESTS | 6 | 77 | 0 | ||
| 304241797 | Listar | A | Feb. 3, 2025, 11:45 a.m. | OK | Python 3 | TESTS | 6 | 77 | 0 | ||
| 304205558 | saltvik | A | Feb. 3, 2025, 4:15 a.m. | OK | Python 3 | TESTS | 6 | 77 | 0 | ||
| 304202154 | Aaravshah2975 | A | Feb. 3, 2025, 3:24 a.m. | OK | Python 3 | TESTS | 6 | 77 | 0 | ||
| 304187770 | spookywooky | A | Feb. 2, 2025, 10:14 p.m. | OK | Rust 2021 | TESTS | 6 | 46 | 0 | ||
| 304250035 | kalinov | A | Feb. 3, 2025, 12:48 p.m. | OK | Rust 2021 | TESTS | 6 | 62 | 0 | ||
| 304209811 | n0b0dy01 | A | Feb. 3, 2025, 5:11 a.m. | OK | Rust 2021 | TESTS | 6 | 62 | 102400 |
Back to search problems