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 |
---|---|---|---|---|---|---|
1529 | Codeforces Round 722 (Div. 2) | FINISHED | False | 8100 | 115485911 | May 24, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 29976 ) | A | Eshag Loves Big Arrays | PROGRAMMING | constructive algorithms greedy |
B'Eshag has an array a consisting of n integers. Eshag can perform the following operation any number of times: choose some subsequence of a and delete every element from it which is strictly larger than AVG , where AVG is the average of the numbers in the chosen subsequence. For example, if a = [1 , 4 , 3 , 2 , 4] and Eshag applies the operation to the subsequence containing a_1 , a_2 , a_4 and a_5 , then he will delete those of these 4 elements which are larger than frac{a_1+a_2+a_4+a_5}{4} = frac{11}{4} , so after the operation, the array a will become a = [1 , 3 , 2] . Your task is to find the maximum number of elements Eshag can delete from the array a by applying the operation described above some number (maybe, zero) times. A sequence b is a subsequence of an array c if b can be obtained from c by deletion of several (possibly, zero or all) elements. The first line contains an integer t (1 <= t <= 100) -- the number of test cases. The description of the test cases follows. The first line of each test case contains an integer n (1 <= n <= 100) -- the length of the array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n (1 <= a_i <= 100) -- the elements of the array a . For each test case print a single integer -- the maximum number of elements Eshag can delete from the array a . Consider the first test case. Initially a = [1, 1, 1, 2, 2, 3] . In the first operation, Eshag can choose the subsequence containing a_1 , a_5 and a_6 , their average is equal to frac{a_1 + a_5 + a_6}{3} = frac{6}{3} = 2 . So a_6 will be deleted. After this a = [1, 1, 1, 2, 2] . In the second operation, Eshag can choose the subsequence containing the whole array a , the average of all its elements is equal to frac{7}{5} . So a_'... |
Codeforces Round #722 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
117264058 | karthik1636 | A | May 24, 2021, 7:26 p.m. | OK | Clang++17 Diagnostics | TESTS | 6 | 46 | 0 | ||
117284262 | kxsk | A | May 25, 2021, 5:06 a.m. | OK | Clang++17 Diagnostics | TESTS | 6 | 61 | 0 | ||
117253396 | N.N_2004 | A | May 24, 2021, 5:17 p.m. | OK | Clang++17 Diagnostics | TESTS | 6 | 62 | 2662400 | ||
117250653 | Strangler123 | A | May 24, 2021, 4:45 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
117247941 | huangmx | A | May 24, 2021, 4:37 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
117250602 | Angsuman | A | May 24, 2021, 4:45 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
117279843 | IOKKOI | A | May 25, 2021, 3:50 a.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
117278569 | rakib12 | A | May 25, 2021, 3:23 a.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
117275507 | sumanthbittu | A | May 25, 2021, 2:14 a.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
117271527 | SriBharath555 | A | May 24, 2021, 11:29 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
117268138 | mustapha.bedoui | A | May 24, 2021, 9:04 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
117266531 | Prof_Schrodinger | A | May 24, 2021, 8:21 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
117263788 | harsh16kh | A | May 24, 2021, 7:20 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
117282931 | Bananana. | A | May 25, 2021, 4:47 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | ||
117282616 | Shaenfre | A | May 25, 2021, 4:41 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | ||
117282175 | jooncco | A | May 25, 2021, 4:34 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | ||
117281187 | SAXYAM | A | May 25, 2021, 4:17 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | ||
117283024 | jahidhasan1893 | A | May 25, 2021, 4:48 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | ||
117284399 | aravindhanb227 | A | May 25, 2021, 5:08 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | ||
117284441 | zxpzxpzxp | A | May 25, 2021, 5:08 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | ||
117284463 | GQiang | A | May 25, 2021, 5:09 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | ||
117286671 | AmeenShaC | A | May 25, 2021, 5:38 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | ||
117287723 | wangyizheng | A | May 25, 2021, 5:52 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | ||
117284491 | S_yadav010 | A | May 25, 2021, 5:09 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
117288235 | gary940610 | A | May 25, 2021, 5:58 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
117287480 | yash_tyag1 | A | May 25, 2021, 5:49 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
117286497 | jerryon1027 | A | May 25, 2021, 5:36 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
117285056 | MohitElite1 | A | May 25, 2021, 5:17 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
117284708 | Noor_here | A | May 25, 2021, 5:12 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
117284597 | Vita_fan | A | May 25, 2021, 5:10 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
117283868 | BinaryCoder | A | May 25, 2021, 5:01 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
117282780 | ananyasingh | A | May 25, 2021, 4:44 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
117282236 | freakdeep | A | May 25, 2021, 4:35 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
117256549 | blueconch | A | May 24, 2021, 5:38 p.m. | OK | GNU C++17 | TESTS | 6 | 0 | 204800 | ||
117286284 | OM_840 | A | May 25, 2021, 5:33 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
117286162 | LostDev | A | May 25, 2021, 5:32 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
117285999 | wawa1551 | A | May 25, 2021, 5:29 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
117286703 | _idgaf_ | A | May 25, 2021, 5:39 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
117286902 | MSD_SINSINWAAR | A | May 25, 2021, 5:42 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
117287728 | jbushra781 | A | May 25, 2021, 5:52 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
117287753 | ________________ | A | May 25, 2021, 5:52 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
117288115 | Yash_2711 | A | May 25, 2021, 5:57 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
117288240 | Nalin999 | A | May 25, 2021, 5:59 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
117283403 | Murabito-B | A | May 25, 2021, 4:54 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
117282726 | sameeralamynwa | A | May 25, 2021, 4:43 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
117282149 | RonSkk23 | A | May 25, 2021, 4:34 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
117281701 | DeclareWar | A | May 25, 2021, 4:26 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
117283172 | thesiddhantsharma | A | May 25, 2021, 4:50 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
117285743 | rath772k | A | May 25, 2021, 5:26 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
117285169 | A_Mann | A | May 25, 2021, 5:18 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
117284252 | MrSkullduggery | A | May 25, 2021, 5:06 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
117283775 | rishabh_devbanshi | A | May 25, 2021, 4:59 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
117283671 | novice166 | A | May 25, 2021, 4:58 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
117259267 | Sunshine_Hu | A | May 24, 2021, 6:09 p.m. | OK | Go | TESTS | 6 | 93 | 0 | ||
117264508 | zenilharia26 | A | May 24, 2021, 7:35 p.m. | OK | Java 11 | TESTS | 6 | 156 | 0 | ||
117265471 | javedbaig | A | May 24, 2021, 7:57 p.m. | OK | Java 11 | TESTS | 6 | 156 | 0 | ||
117264889 | ak_ankit | A | May 24, 2021, 7:43 p.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | ||
117281847 | liu | A | May 25, 2021, 4:28 a.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | ||
117281841 | shubhamraj04061999 | A | May 25, 2021, 4:28 a.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | ||
117276619 | RitGit | A | May 25, 2021, 2:42 a.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | ||
117267477 | varunmodi01 | A | May 24, 2021, 8:46 p.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | ||
117288038 | Abhi_Valani | A | May 25, 2021, 5:56 a.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | ||
117285701 | KGECian_23 | A | May 25, 2021, 5:25 a.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | ||
117284973 | ryanranaut | A | May 25, 2021, 5:16 a.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | ||
117269564 | RonWonWon | A | May 24, 2021, 9:50 p.m. | OK | Java 8 | TESTS | 6 | 93 | 0 | ||
117257581 | rafee69029 | A | May 24, 2021, 5:49 p.m. | OK | Java 8 | TESTS | 6 | 93 | 0 | ||
117255565 | rohanyeahyeah | A | May 24, 2021, 5:29 p.m. | OK | Java 8 | TESTS | 6 | 93 | 0 | ||
117275518 | Abdallah_Ragab00 | A | May 25, 2021, 2:14 a.m. | OK | Java 8 | TESTS | 6 | 93 | 0 | ||
117259790 | twoBit | A | May 24, 2021, 6:16 p.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | ||
117251877 | saswataghoshnit99 | A | May 24, 2021, 4:48 p.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | ||
117266593 | mookid | A | May 24, 2021, 8:23 p.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | ||
117254477 | aakashkrsingh1 | A | May 24, 2021, 5:22 p.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | ||
117281622 | shubhamraj04061999 | A | May 25, 2021, 4:24 a.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | ||
117275096 | thedesalizes | A | May 25, 2021, 2:02 a.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | ||
117279685 | kokonatsu | A | May 25, 2021, 3:46 a.m. | OK | Kotlin | TESTS | 6 | 109 | 0 | ||
117274505 | Spheniscine | A | May 25, 2021, 1:41 a.m. | OK | Kotlin | TESTS | 6 | 155 | 1126400 | ||
117262071 | wbars | A | May 24, 2021, 6:49 p.m. | OK | Kotlin | TESTS | 6 | 171 | 1945600 | ||
117263792 | TRR | A | May 24, 2021, 7:20 p.m. | OK | Mono C# | TESTS | 6 | 31 | 307200 | ||
117255741 | Bolota | A | May 24, 2021, 5:31 p.m. | OK | Mono C# | TESTS | 6 | 46 | 4198400 | ||
117283730 | 01shambhavi | A | May 25, 2021, 4:58 a.m. | OK | MS C++ | TESTS | 6 | 15 | 0 | ||
117283885 | 01shambhavi | A | May 25, 2021, 5:01 a.m. | OK | MS C++ | TESTS | 6 | 15 | 0 | ||
117245215 | ekateriina | A | May 24, 2021, 4:28 p.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
117278765 | ZZFWNS | A | May 25, 2021, 3:27 a.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
117274942 | Dasheverless | A | May 25, 2021, 1:56 a.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
117273007 | XingQuan | A | May 25, 2021, 12:39 a.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
117259895 | ItamarNir | A | May 24, 2021, 6:18 p.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
117265179 | rho01 | A | May 24, 2021, 7:50 p.m. | OK | MS C++ 2017 | TESTS | 6 | 30 | 0 | ||
117269936 | kurzwe6er | A | May 24, 2021, 10:06 p.m. | OK | MS C++ 2017 | TESTS | 6 | 31 | 0 | ||
117256430 | Insurkin | A | May 24, 2021, 5:37 p.m. | OK | .NET Core C# | TESTS | 6 | 77 | 512000 | ||
117263121 | nibred | A | May 24, 2021, 7:08 p.m. | OK | .NET Core C# | TESTS | 6 | 93 | 819200 | ||
117247149 | ZamTheMan | A | May 24, 2021, 4:34 p.m. | OK | .NET Core C# | TESTS | 6 | 93 | 819200 | ||
117259205 | azukun | A | May 24, 2021, 6:09 p.m. | OK | .NET Core C# | TESTS | 6 | 108 | 921600 | ||
117258444 | henrychenOutlook | A | May 24, 2021, 5:58 p.m. | OK | Node.js | TESTS | 6 | 93 | 1638400 | ||
117286314 | not_tehlka | A | May 25, 2021, 5:34 a.m. | OK | PyPy 3 | TESTS | 6 | 92 | 1331200 | ||
117246737 | nayan1411 | A | May 24, 2021, 4:33 p.m. | OK | PyPy 3 | TESTS | 6 | 93 | 1331200 | ||
117284815 | _ArUp_ | A | May 25, 2021, 5:13 a.m. | OK | PyPy 3 | TESTS | 6 | 93 | 1433600 | ||
117275581 | petrafied | A | May 25, 2021, 2:16 a.m. | OK | PyPy 3 | TESTS | 6 | 93 | 1433600 | ||
117265095 | Xalco | A | May 24, 2021, 7:48 p.m. | OK | PyPy 3 | TESTS | 6 | 93 | 1433600 | ||
117263770 | Mistaek | A | May 24, 2021, 7:20 p.m. | OK | PyPy 3 | TESTS | 6 | 93 | 1433600 | ||
117261331 | newbie_for_ever | A | May 24, 2021, 6:39 p.m. | OK | PyPy 3 | TESTS | 6 | 93 | 1433600 | ||
117257045 | rishabhrao | A | May 24, 2021, 5:43 p.m. | OK | PyPy 3 | TESTS | 6 | 93 | 1433600 | ||
117255999 | VINAY-SHARMA | A | May 24, 2021, 5:32 p.m. | OK | PyPy 3 | TESTS | 6 | 93 | 1433600 | ||
117277181 | rshao19 | A | May 25, 2021, 2:55 a.m. | OK | PyPy 3 | TESTS | 6 | 93 | 1536000 | ||
117260423 | elistark | A | May 24, 2021, 6:25 p.m. | OK | Python 2 | TESTS | 6 | 62 | 0 | ||
117282517 | n4vn3t | A | May 25, 2021, 4:39 a.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
117275938 | Datso | A | May 25, 2021, 2:25 a.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
117263992 | dreamgrants | A | May 24, 2021, 7:24 p.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
117262230 | arpitpal | A | May 24, 2021, 6:52 p.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
117261952 | thErocKstaR | A | May 24, 2021, 6:48 p.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
117260712 | XdjX | A | May 24, 2021, 6:29 p.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
117258174 | vihas007makwana | A | May 24, 2021, 5:55 p.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
117244904 | nihasrithota | A | May 24, 2021, 4:27 p.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
117244592 | akhila_24 | A | May 24, 2021, 4:26 p.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
117259691 | ad12.go | A | May 24, 2021, 6:15 p.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
117254870 | The_KingSlayer_ | A | May 24, 2021, 5:25 p.m. | OK | Python 3 + libs | TESTS | 6 | 62 | 0 | ||
117261160 | parth_1883 | A | May 24, 2021, 6:36 p.m. | OK | Python 3 + libs | TESTS | 6 | 296 | 0 | ||
117273695 | Cpp | A | May 25, 2021, 1:09 a.m. | OK | Ruby 3 | TESTS | 6 | 249 | 204800 | ||
117265063 | SorKierkegaard | A | May 24, 2021, 7:47 p.m. | OK | Rust | TESTS | 6 | 30 | 0 |
Back to search problems