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 |
---|---|---|---|---|---|---|
1713 | Codeforces Round 812 (Div. 2) | FINISHED | False | 7200 | 72026699 | Aug. 6, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 21400 ) | B | Optimal Reduction | PROGRAMMING | constructive algorithms sortings | 1000 |
B'Consider an array a of n positive integers. You may perform the following operation: Let 's call f(a) the minimum number of operations needed to change array a into an array of n zeros. Determine if for all permutations ^ dagger b of a , f(a) <= q f(b) is true. ^ dagger An array b is a permutation of an array a if b consists of the elements of a in arbitrary order. For example, [4,2,3,4] is a permutation of [3,2,4,4] while [1,2,2] is not a permutation of [1,2,3] . The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= q n <= q 10^5 ) -- the length of the array a . The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ) -- description of the array a . It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, print "YES" (without quotes) if for all permutations b of a , f(a) <= q f(b) is true, and "NO" (without quotes) otherwise. You can output "YES" and "NO" in any case (for example, strings "yEs", "yes" and "Yes" will be recognized as a positive response). In the first test case, we can change all elements to 0 in 5 operations. It can be shown that no permutation of [2, 3, 5, 4] requires less than 5 operations to change all elements to 0 . In the third test case, we need 5 operations to change all elements to 0 , while [2, 3, 3, 1] only needs 3 operations. '... |
Codeforces Round #812 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
167348690 | LeonGymretzka | B | Aug. 7, 2022, 4:39 a.m. | OK | GNU C11 | TESTS | 19 | 46 | 0 | 1000 | |
167344388 | YiLinG | B | Aug. 7, 2022, 3:25 a.m. | OK | GNU C11 | TESTS | 18 | 46 | 819200 | 1000 | |
167344365 | YiLinG | B | Aug. 7, 2022, 3:24 a.m. | OK | GNU C11 | TESTS | 18 | 62 | 819200 | 1000 | |
167304547 | shakhawat2277 | B | Aug. 6, 2022, 4:34 p.m. | OK | GNU C11 | TESTS | 18 | 78 | 409600 | 1000 | |
167301779 | aanjaimi | B | Aug. 6, 2022, 4:30 p.m. | OK | GNU C11 | TESTS | 18 | 93 | 819200 | 1000 | |
167333045 | CuiZhenhang | B | Aug. 6, 2022, 11:10 p.m. | OK | GNU C++14 | TESTS | 18 | 30 | 1024000 | 1000 | |
167299477 | Minhazur | B | Aug. 6, 2022, 4:25 p.m. | OK | GNU C++14 | TESTS | 18 | 31 | 0 | 1000 | |
167339204 | 1761177247 | B | Aug. 7, 2022, 1:53 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 0 | 1000 | |
167335921 | LUKI | B | Aug. 7, 2022, 12:32 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 409600 | 1000 | |
167328482 | _ncm_ | B | Aug. 6, 2022, 9:22 p.m. | OK | GNU C++14 | TESTS | 18 | 31 | 409600 | 1000 | |
167336913 | qdhys | B | Aug. 7, 2022, 12:59 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 409600 | 1000 | |
167337501 | shenkaihang | B | Aug. 7, 2022, 1:14 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 409600 | 1000 | |
167339595 | ansrl | B | Aug. 7, 2022, 2:01 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 409600 | 1000 | |
167346729 | lixuanta | B | Aug. 7, 2022, 4:05 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 409600 | 1000 | |
167336738 | tuxuanming2024 | B | Aug. 7, 2022, 12:54 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 409600 | 1000 | |
167322704 | AgHuang | B | Aug. 6, 2022, 7:56 p.m. | OK | GNU C++17 | TESTS | 18 | 31 | 0 | 1000 | |
167342184 | RandomLB | B | Aug. 7, 2022, 2:49 a.m. | OK | GNU C++17 | TESTS | 18 | 31 | 0 | 1000 | |
167343196 | HusseinSaad | B | Aug. 7, 2022, 3:06 a.m. | OK | GNU C++17 | TESTS | 18 | 31 | 409600 | 1000 | |
167337976 | abdallah_moemen | B | Aug. 7, 2022, 1:25 a.m. | OK | GNU C++17 | TESTS | 18 | 31 | 409600 | 1000 | |
167332627 | Al-Sadi | B | Aug. 6, 2022, 10:58 p.m. | OK | GNU C++17 | TESTS | 18 | 31 | 409600 | 1000 | |
167346770 | himanshu_0502 | B | Aug. 7, 2022, 4:06 a.m. | OK | GNU C++17 | TESTS | 18 | 31 | 409600 | 1000 | |
167343976 | darkcodercb12 | B | Aug. 7, 2022, 3:18 a.m. | OK | GNU C++17 | TESTS | 18 | 31 | 409600 | 1000 | |
167350198 | CoDeveRse_07 | B | Aug. 7, 2022, 5:02 a.m. | OK | GNU C++17 | TESTS | 19 | 31 | 409600 | 1000 | |
167349320 | TsReaper | B | Aug. 7, 2022, 4:49 a.m. | OK | GNU C++17 | TESTS | 19 | 31 | 409600 | 1000 | |
167349068 | Pepinni_07 | B | Aug. 7, 2022, 4:45 a.m. | OK | GNU C++17 | TESTS | 19 | 31 | 409600 | 1000 | |
167312076 | arnab8002 | B | Aug. 6, 2022, 6:19 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 819200 | 1000 | |
167350828 | -wicton- | B | Aug. 7, 2022, 5:10 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 1228800 | 1000 | |
167323765 | noob_26 | B | Aug. 6, 2022, 8:09 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 2969600 | 1000 | |
167330723 | hustler_123 | B | Aug. 6, 2022, 10:08 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 409600 | 1000 | |
167312710 | BalaluevEgor | B | Aug. 6, 2022, 6:21 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 409600 | 1000 | |
167319166 | hara_1999 | B | Aug. 6, 2022, 7:16 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 409600 | 1000 | |
167330743 | neo_37 | B | Aug. 6, 2022, 10:09 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 409600 | 1000 | |
167328242 | urbanmyth | B | Aug. 6, 2022, 9:17 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 2457600 | 1000 | |
167313066 | BigSecret | B | Aug. 6, 2022, 6:24 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 17510400 | 1000 | |
167354622 | er007 | B | Aug. 7, 2022, 5:57 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 31 | 409600 | 1000 | |
167317613 | ARSHKHAN98 | B | Aug. 6, 2022, 7 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 409600 | 1000 | |
167312305 | tasker342 | B | Aug. 6, 2022, 6:20 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 409600 | 1000 | |
167303750 | zxc_ivan | B | Aug. 6, 2022, 4:33 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 409600 | 1000 | |
167302659 | Divyanshi66 | B | Aug. 6, 2022, 4:31 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 409600 | 1000 | |
167318358 | im_veer29 | B | Aug. 6, 2022, 7:08 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 409600 | 1000 | |
167323265 | loser707 | B | Aug. 6, 2022, 8:03 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 409600 | 1000 | |
167323345 | AbdAlrahman_Emad | B | Aug. 6, 2022, 8:04 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 409600 | 1000 | |
167341589 | Nakamiya | B | Aug. 7, 2022, 2:37 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 409600 | 1000 | |
167347709 | ABDULLAH_AL_MAHMUD_ARAF | B | Aug. 7, 2022, 4:23 a.m. | OK | GNU C++20 (64) | TESTS | 19 | 15 | 409600 | 1000 | |
167300264 | baby._.shadow | B | Aug. 6, 2022, 4:27 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 409600 | 1000 | |
167332090 | satyaa_78 | B | Aug. 6, 2022, 10:43 p.m. | OK | Java 11 | TESTS | 18 | 155 | 0 | 1000 | |
167321272 | VicG | B | Aug. 6, 2022, 7:38 p.m. | OK | Java 11 | TESTS | 18 | 186 | 0 | 1000 | |
167353605 | __Serendipity | B | Aug. 7, 2022, 5:45 a.m. | OK | Java 11 | TESTS | 19 | 187 | 0 | 1000 | |
167325391 | BucketOfNubbins | B | Aug. 6, 2022, 8:31 p.m. | OK | Java 11 | TESTS | 18 | 187 | 2764800 | 1000 | |
167322133 | veerabhadra | B | Aug. 6, 2022, 7:49 p.m. | OK | Java 11 | TESTS | 18 | 202 | 0 | 1000 | |
167312403 | x21svage | B | Aug. 6, 2022, 6:20 p.m. | OK | Java 11 | TESTS | 18 | 233 | 0 | 1000 | |
167346747 | amitmandal | B | Aug. 7, 2022, 4:05 a.m. | OK | Java 11 | TESTS | 18 | 249 | 0 | 1000 | |
167330722 | kyaruru | B | Aug. 6, 2022, 10:08 p.m. | OK | Java 11 | TESTS | 18 | 249 | 2764800 | 1000 | |
167332960 | djrfrn | B | Aug. 6, 2022, 11:07 p.m. | OK | Java 11 | TESTS | 18 | 264 | 0 | 1000 | |
167312381 | gurkaran_s | B | Aug. 6, 2022, 6:20 p.m. | OK | Java 11 | TESTS | 18 | 264 | 0 | 1000 | |
167331316 | _Astron | B | Aug. 6, 2022, 10:22 p.m. | OK | Java 17 | TESTS | 18 | 187 | 716800 | 1000 | |
167324219 | CrinklyGolem | B | Aug. 6, 2022, 8:15 p.m. | OK | Java 17 | TESTS | 18 | 218 | 614400 | 1000 | |
167314593 | harman1148 | B | Aug. 6, 2022, 6:33 p.m. | OK | Java 17 | TESTS | 18 | 249 | 4096000 | 1000 | |
167300585 | matzhao | B | Aug. 6, 2022, 4:27 p.m. | OK | Java 17 | TESTS | 18 | 265 | 102400 | 1000 | |
167327166 | Solqr | B | Aug. 6, 2022, 8:58 p.m. | OK | Java 17 | TESTS | 18 | 280 | 6348800 | 1000 | |
167302694 | idk_123 | B | Aug. 6, 2022, 4:31 p.m. | OK | Java 17 | TESTS | 18 | 312 | 614400 | 1000 | |
167323699 | Solqr | B | Aug. 6, 2022, 8:08 p.m. | OK | Java 17 | TESTS | 18 | 326 | 4608000 | 1000 | |
167326356 | Solqr | B | Aug. 6, 2022, 8:45 p.m. | OK | Java 17 | TESTS | 18 | 342 | 5632000 | 1000 | |
167319520 | bhavesh1914 | B | Aug. 6, 2022, 7:20 p.m. | OK | Java 17 | TESTS | 18 | 389 | 614400 | 1000 | |
167313876 | AdityaGupta19 | B | Aug. 6, 2022, 6:29 p.m. | OK | Java 17 | TESTS | 18 | 389 | 614400 | 1000 | |
167321403 | Kritika717 | B | Aug. 6, 2022, 7:40 p.m. | OK | Java 8 | TESTS | 18 | 109 | 1843200 | 1000 | |
167323080 | T_PAVAN_NAGARAJU | B | Aug. 6, 2022, 8:01 p.m. | OK | Java 8 | TESTS | 18 | 124 | 0 | 1000 | |
167335712 | ahmedtawfik | B | Aug. 7, 2022, 12:26 a.m. | OK | Java 8 | TESTS | 18 | 124 | 1843200 | 1000 | |
167316369 | jashwanth200117 | B | Aug. 6, 2022, 6:48 p.m. | OK | Java 8 | TESTS | 18 | 139 | 1843200 | 1000 | |
167353282 | swaggy_baba | B | Aug. 7, 2022, 5:41 a.m. | OK | Java 8 | TESTS | 19 | 139 | 7475200 | 1000 | |
167347669 | athu18 | B | Aug. 7, 2022, 4:22 a.m. | OK | Java 8 | TESTS | 19 | 140 | 0 | 1000 | |
167334667 | Mustafa__ | B | Aug. 6, 2022, 11:57 p.m. | OK | Java 8 | TESTS | 18 | 155 | 1843200 | 1000 | |
167319587 | _kritika_17 | B | Aug. 6, 2022, 7:20 p.m. | OK | Java 8 | TESTS | 18 | 155 | 1843200 | 1000 | |
167319209 | Mohamed_A7med | B | Aug. 6, 2022, 7:16 p.m. | OK | Java 8 | TESTS | 18 | 155 | 1843200 | 1000 | |
167319420 | _kritika_17 | B | Aug. 6, 2022, 7:19 p.m. | OK | Java 8 | TESTS | 18 | 171 | 1843200 | 1000 | |
167316681 | MikeInferno | B | Aug. 6, 2022, 6:51 p.m. | OK | Kotlin 1.6 | TESTS | 18 | 342 | 5632000 | 1000 | |
167330240 | khrystyna_dol | B | Aug. 6, 2022, 9:56 p.m. | OK | MS C++ 2017 | TESTS | 18 | 109 | 819200 | 1000 | |
167338856 | thoanhkhoa2702 | B | Aug. 7, 2022, 1:45 a.m. | OK | MS C++ 2017 | TESTS | 18 | 139 | 409600 | 1000 | |
167311523 | Nosov_Vovanus2022 | B | Aug. 6, 2022, 6:17 p.m. | OK | MS C++ 2017 | TESTS | 18 | 140 | 819200 | 1000 | |
167346931 | Crimson_Quasar | B | Aug. 7, 2022, 4:09 a.m. | OK | MS C++ 2017 | TESTS | 18 | 155 | 614400 | 1000 | |
167319096 | rsFalse | B | Aug. 6, 2022, 7:15 p.m. | OK | Perl | TESTS | 18 | 171 | 3072000 | 1000 | |
167334777 | WalrusRamen21 | B | Aug. 7, 2022, midnight | OK | PHP | TESTS | 18 | 61 | 20992000 | 1000 | |
167324549 | 1_2_3_4_5_9 | B | Aug. 6, 2022, 8:20 p.m. | OK | PyPy 2 | TESTS | 18 | 264 | 14643200 | 1000 | |
167315650 | bobxiong88 | B | Aug. 6, 2022, 6:42 p.m. | OK | PyPy 3 | TESTS | 18 | 217 | 11776000 | 1000 | |
167315776 | Prakul_Agrawal | B | Aug. 6, 2022, 6:43 p.m. | OK | PyPy 3 | TESTS | 18 | 405 | 10956800 | 1000 | |
167321187 | paxaq | B | Aug. 6, 2022, 7:38 p.m. | OK | PyPy 3 | TESTS | 18 | 405 | 11264000 | 1000 | |
167347300 | MohammadsadraSedighin | B | Aug. 7, 2022, 4:16 a.m. | OK | PyPy 3 | TESTS | 18 | 420 | 10956800 | 1000 | |
167300908 | satwikum | B | Aug. 6, 2022, 4:28 p.m. | OK | PyPy 3 | TESTS | 18 | 498 | 12083200 | 1000 | |
167314518 | shriom533 | B | Aug. 6, 2022, 6:33 p.m. | OK | PyPy 3 | TESTS | 18 | 561 | 10956800 | 1000 | |
167318161 | Abdelrahim303 | B | Aug. 6, 2022, 7:06 p.m. | OK | PyPy 3 | TESTS | 18 | 716 | 10956800 | 1000 | |
167317192 | MistaAsh | B | Aug. 6, 2022, 6:57 p.m. | OK | PyPy 3-64 | TESTS | 18 | 109 | 13414400 | 1000 | |
167340553 | staycurious | B | Aug. 7, 2022, 2:18 a.m. | OK | PyPy 3-64 | TESTS | 18 | 124 | 13619200 | 1000 | |
167339109 | blue_ice_yj | B | Aug. 7, 2022, 1:51 a.m. | OK | PyPy 3-64 | TESTS | 18 | 140 | 19456000 | 1000 | |
167341960 | Youarenotgood | B | Aug. 7, 2022, 2:45 a.m. | OK | PyPy 3-64 | TESTS | 18 | 155 | 13414400 | 1000 | |
167323952 | SangeetaSingh | B | Aug. 6, 2022, 8:11 p.m. | OK | PyPy 3-64 | TESTS | 18 | 155 | 14745600 | 1000 | |
167332168 | TheViking733n | B | Aug. 6, 2022, 10:46 p.m. | OK | PyPy 3-64 | TESTS | 18 | 155 | 17305600 | 1000 | |
167322172 | sangram03 | B | Aug. 6, 2022, 7:49 p.m. | OK | PyPy 3-64 | TESTS | 18 | 171 | 17817600 | 1000 | |
167315052 | Aksnov | B | Aug. 6, 2022, 6:37 p.m. | OK | PyPy 3-64 | TESTS | 18 | 186 | 14028800 | 1000 | |
167354313 | kwin | B | Aug. 7, 2022, 5:53 a.m. | OK | PyPy 3-64 | TESTS | 19 | 186 | 14131200 | 1000 | |
167313492 | gesuta | B | Aug. 6, 2022, 6:26 p.m. | OK | PyPy 3-64 | TESTS | 18 | 249 | 15052800 | 1000 | |
167303254 | OGgyR | B | Aug. 6, 2022, 4:32 p.m. | OK | Python 3 | TESTS | 18 | 124 | 9318400 | 1000 | |
167350852 | bissenbay | B | Aug. 7, 2022, 5:11 a.m. | OK | Python 3 | TESTS | 19 | 140 | 8806400 | 1000 | |
167327232 | Dalimnassar | B | Aug. 6, 2022, 8:59 p.m. | OK | Python 3 | TESTS | 18 | 170 | 9216000 | 1000 | |
167338294 | SJOKER | B | Aug. 7, 2022, 1:32 a.m. | OK | Python 3 | TESTS | 18 | 171 | 8806400 | 1000 | |
167317671 | r9RLx | B | Aug. 6, 2022, 7:01 p.m. | OK | Python 3 | TESTS | 18 | 186 | 8806400 | 1000 | |
167322037 | defaultdance | B | Aug. 6, 2022, 7:48 p.m. | OK | Python 3 | TESTS | 18 | 187 | 7065600 | 1000 | |
167346460 | Naman_nirwan113 | B | Aug. 7, 2022, 4 a.m. | OK | Python 3 | TESTS | 18 | 187 | 8806400 | 1000 | |
167341089 | joi_ | B | Aug. 7, 2022, 2:28 a.m. | OK | Python 3 | TESTS | 18 | 187 | 8806400 | 1000 | |
167329496 | Alive_but_not_living | B | Aug. 6, 2022, 9:41 p.m. | OK | Python 3 | TESTS | 18 | 187 | 8806400 | 1000 | |
167324418 | asdevdinesh786 | B | Aug. 6, 2022, 8:18 p.m. | OK | Python 3 | TESTS | 18 | 187 | 9113600 | 1000 | |
167336296 | utkarsh | B | Aug. 7, 2022, 12:42 a.m. | OK | Ruby 3 | TESTS | 18 | 343 | 8294400 | 1000 | |
167318781 | tngyl | B | Aug. 6, 2022, 7:12 p.m. | OK | Rust 2021 | TESTS | 18 | 109 | 409600 | 1000 | |
167338507 | MvKaio | B | Aug. 7, 2022, 1:37 a.m. | OK | Rust 2021 | TESTS | 18 | 124 | 8806400 | 1000 |
Back to search problems