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 |
---|---|---|---|---|---|---|
1931 | Codeforces Round 925 (Div. 3) | FINISHED | False | 8100 | 23988299 | Feb. 13, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 32374 ) | B | Make Equal | PROGRAMMING | greedy |
B'There are n containers of water lined up, numbered from left to right from 1 to n . Each container can hold any amount of water; initially, the i -th container contains a_i units of water. The sum of a_i is divisible by n . You can apply the following operation any (possibly zero) number of times: pour any amount of water from the i -th container to the j -th container, where i must be less than j (i.e. i<j ). Any index can be chosen as i or j any number of times. Determine whether it is possible to make the amount of water in all containers the same using this operation. The first line of the input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then the descriptions of the test cases follow. The first line of each test case contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of containers with water. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 0 <= a_i <= 10^9 ) -- the amounts of water in the containers. It is guaranteed that the sum of a_i in each test case does not exceed 2 cdot 10^9 . Also, the sum of a_i is divisible by n . It is guaranteed that the sum of n over all test cases in the input does not exceed 2 cdot 10^5 . Output t lines, each of which is the answer to the corresponding test case. As the answer, output "YES" if it is possible to make the amount of water in all containers the same using the described operation. Otherwise, output "NO". You can output each letter in any case (lowercase or uppercase). For example, the strings "yEs", "yes", "Yes", and "YES" will be accepted as a positive answer. In the third test case of the example ( a=[4, 5, 2, 1, 3] ), you can proceed as follows: '... |
125878 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
246295285 | bluemegane | B | Feb. 13, 2024, 11:12 p.m. | OK | C# 8 | TESTS | 5 | 93 | 14438400 | ||
246310893 | tretrauso1vien | B | Feb. 14, 2024, 4:51 a.m. | OK | Clang++17 Diagnostics | TESTS | 5 | 639 | 1843200 | ||
246299399 | Jethalal.Gada | B | Feb. 14, 2024, 1:07 a.m. | OK | Clang++20 Diagnostics | TESTS | 5 | 717 | 819200 | ||
246296653 | Hager-sabry | B | Feb. 13, 2024, 11:47 p.m. | OK | Clang++20 Diagnostics | TESTS | 5 | 717 | 1638400 | ||
246309374 | tkddn5623 | B | Feb. 14, 2024, 4:29 a.m. | OK | GNU C11 | TESTS | 5 | 31 | 1024000 | ||
246277326 | realanonymusic | B | Feb. 13, 2024, 7:07 p.m. | OK | GNU C11 | TESTS | 5 | 46 | 819200 | ||
246309565 | chef_gladiator | B | Feb. 14, 2024, 4:32 a.m. | OK | GNU C11 | TESTS | 5 | 46 | 819200 | ||
246262814 | Azhdar | B | Feb. 13, 2024, 5:23 p.m. | OK | GNU C11 | TESTS | 5 | 46 | 819200 | ||
246259046 | junayet_algo | B | Feb. 13, 2024, 5:05 p.m. | OK | GNU C11 | TESTS | 5 | 46 | 819200 | ||
246258854 | xportiom | B | Feb. 13, 2024, 5:04 p.m. | OK | GNU C11 | TESTS | 5 | 46 | 819200 | ||
246315478 | J_A_I_KUMAR | B | Feb. 14, 2024, 5:47 a.m. | OK | GNU C11 | TESTS | 5 | 46 | 819200 | ||
246268899 | Aditya_nath_5002 | B | Feb. 13, 2024, 6 p.m. | OK | GNU C11 | TESTS | 5 | 46 | 1024000 | ||
246303835 | Abu_Ubaida_00 | B | Feb. 14, 2024, 2:56 a.m. | OK | GNU C11 | TESTS | 5 | 46 | 1024000 | ||
246271461 | oksatyam | B | Feb. 13, 2024, 6:18 p.m. | OK | GNU C11 | TESTS | 5 | 46 | 1024000 | ||
246257801 | KASRA_BAHRAMI | B | Feb. 13, 2024, 5 p.m. | OK | GNU C++17 | TESTS | 5 | 31 | 819200 | ||
246310094 | HU__N | B | Feb. 14, 2024, 4:40 a.m. | OK | GNU C++17 | TESTS | 5 | 31 | 819200 | ||
246300693 | serenipity | B | Feb. 14, 2024, 1:45 a.m. | OK | GNU C++17 | TESTS | 5 | 31 | 819200 | ||
246300584 | D1stance | B | Feb. 14, 2024, 1:42 a.m. | OK | GNU C++17 | TESTS | 5 | 31 | 819200 | ||
246275428 | OUT_OF_RANG | B | Feb. 13, 2024, 6:50 p.m. | OK | GNU C++17 | TESTS | 5 | 31 | 819200 | ||
246272512 | perlentaucher | B | Feb. 13, 2024, 6:26 p.m. | OK | GNU C++17 | TESTS | 5 | 31 | 819200 | ||
246270785 | Aryan_110 | B | Feb. 13, 2024, 6:13 p.m. | OK | GNU C++17 | TESTS | 5 | 31 | 819200 | ||
246269537 | Tirtha_Manan_Das | B | Feb. 13, 2024, 6:04 p.m. | OK | GNU C++17 | TESTS | 5 | 31 | 819200 | ||
246262956 | Team5_PhamDung | B | Feb. 13, 2024, 5:24 p.m. | OK | GNU C++17 | TESTS | 5 | 31 | 819200 | ||
246312805 | rakib2017 | B | Feb. 14, 2024, 5:15 a.m. | OK | GNU C++17 | TESTS | 5 | 31 | 1638400 | ||
246302022 | hatsuyufei | B | Feb. 14, 2024, 2:17 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 819200 | ||
246271325 | AALoOo | B | Feb. 13, 2024, 6:17 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 819200 | ||
246301044 | bkifhr7 | B | Feb. 14, 2024, 1:54 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 1024000 | ||
246310325 | BaruchdeSpinoza | B | Feb. 14, 2024, 4:44 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 1638400 | ||
246313868 | ntxyl | B | Feb. 14, 2024, 5:27 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 1638400 | ||
246313157 | ClinZ | B | Feb. 14, 2024, 5:19 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 1638400 | ||
246303471 | DanRan02 | B | Feb. 14, 2024, 2:50 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 30 | 1638400 | ||
246312132 | Winding. | B | Feb. 14, 2024, 5:06 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 31 | 819200 | ||
246313143 | VitrelosTia | B | Feb. 14, 2024, 5:19 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 31 | 819200 | ||
246315553 | xu_512 | B | Feb. 14, 2024, 5:48 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 31 | 819200 | ||
246283343 | asmitdeb | B | Feb. 13, 2024, 8:04 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 819200 | ||
246303718 | manipulatedBit | B | Feb. 14, 2024, 2:54 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 819200 | ||
246307574 | hhcpp | B | Feb. 14, 2024, 3:59 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 819200 | ||
246307837 | Yogi_Monk_4907 | B | Feb. 14, 2024, 4:03 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 819200 | ||
246308964 | yash_siwach | B | Feb. 14, 2024, 4:23 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 819200 | ||
246313343 | pzdc_n4hu1_z4eb4l1 | B | Feb. 14, 2024, 5:21 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 819200 | ||
246285847 | archiit | B | Feb. 13, 2024, 8:33 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 819200 | ||
246294134 | Omar__Fawzy | B | Feb. 13, 2024, 10:46 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 819200 | ||
246297477 | Biggie | B | Feb. 14, 2024, 12:09 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 819200 | ||
246299367 | MangOo_oO | B | Feb. 14, 2024, 1:06 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 819200 | ||
246279580 | dm.sizov | B | Feb. 13, 2024, 7:28 p.m. | OK | Go | TESTS | 5 | 46 | 7372800 | ||
246295059 | powervic08 | B | Feb. 13, 2024, 11:07 p.m. | OK | Java 21 | TESTS | 5 | 202 | 0 | ||
246278342 | Jagnath_Reddy | B | Feb. 13, 2024, 7:16 p.m. | OK | Java 21 | TESTS | 5 | 233 | 102400 | ||
246309982 | am2003_ | B | Feb. 14, 2024, 4:38 a.m. | OK | Java 21 | TESTS | 5 | 233 | 307200 | ||
246270389 | spiralJava_ | B | Feb. 13, 2024, 6:10 p.m. | OK | Java 21 | TESTS | 5 | 234 | 0 | ||
246312227 | anand_mishra_ | B | Feb. 14, 2024, 5:07 a.m. | OK | Java 21 | TESTS | 5 | 264 | 0 | ||
246271906 | aishwarykesarwani | B | Feb. 13, 2024, 6:21 p.m. | OK | Java 21 | TESTS | 5 | 265 | 0 | ||
246303212 | Nick | B | Feb. 14, 2024, 2:44 a.m. | OK | Java 21 | TESTS | 5 | 265 | 0 | ||
246278591 | Jagnath_Reddy | B | Feb. 13, 2024, 7:18 p.m. | OK | Java 21 | TESTS | 5 | 265 | 0 | ||
246275106 | dzhi | B | Feb. 13, 2024, 6:47 p.m. | OK | Java 21 | TESTS | 5 | 265 | 0 | ||
246313396 | rras | B | Feb. 14, 2024, 5:22 a.m. | OK | Java 21 | TESTS | 5 | 280 | 0 | ||
246258100 | discipleofchrist | B | Feb. 13, 2024, 5:01 p.m. | OK | Java 8 | TESTS | 5 | 139 | 1843200 | ||
246270796 | Mr.Numerator_007 | B | Feb. 13, 2024, 6:13 p.m. | OK | Java 8 | TESTS | 5 | 140 | 0 | ||
246308333 | coderman2004 | B | Feb. 14, 2024, 4:12 a.m. | OK | Java 8 | TESTS | 5 | 140 | 1843200 | ||
246278688 | Indrajit | B | Feb. 13, 2024, 7:19 p.m. | OK | Java 8 | TESTS | 5 | 156 | 5836800 | ||
246303992 | Sumitsingh7 | B | Feb. 14, 2024, 3 a.m. | OK | Java 8 | TESTS | 5 | 217 | 5836800 | ||
246308843 | joycelalalayaa | B | Feb. 14, 2024, 4:20 a.m. | OK | Java 8 | TESTS | 5 | 280 | 0 | ||
246305860 | 2019330 | B | Feb. 14, 2024, 3:33 a.m. | OK | Java 8 | TESTS | 5 | 280 | 0 | ||
246261616 | 21241a6712 | B | Feb. 13, 2024, 5:17 p.m. | OK | Java 8 | TESTS | 5 | 280 | 0 | ||
246306766 | bksingh23 | B | Feb. 14, 2024, 3:46 a.m. | OK | Java 8 | TESTS | 5 | 295 | 0 | ||
246292230 | v312000 | B | Feb. 13, 2024, 10:06 p.m. | OK | Java 8 | TESTS | 5 | 295 | 0 | ||
246310079 | lemon188 | B | Feb. 14, 2024, 4:40 a.m. | OK | MS C++ 2017 | TESTS | 5 | 46 | 3993600 | ||
246259360 | Ashish_Kumar_2003 | B | Feb. 13, 2024, 5:07 p.m. | OK | MS C++ 2017 | TESTS | 5 | 124 | 819200 | ||
246302874 | aluckyboy | B | Feb. 14, 2024, 2:36 a.m. | OK | MS C++ 2017 | TESTS | 5 | 139 | 3174400 | ||
246271622 | Ligfor | B | Feb. 13, 2024, 6:19 p.m. | OK | MS C++ 2017 | TESTS | 5 | 140 | 819200 | ||
246275050 | Alexey_Gayday | B | Feb. 13, 2024, 6:47 p.m. | OK | MS C++ 2017 | TESTS | 5 | 140 | 819200 | ||
246268587 | HET__02 | B | Feb. 13, 2024, 5:58 p.m. | OK | MS C++ 2017 | TESTS | 5 | 140 | 819200 | ||
246265077 | abhinav200513 | B | Feb. 13, 2024, 5:36 p.m. | OK | MS C++ 2017 | TESTS | 5 | 140 | 819200 | ||
246294394 | gani20 | B | Feb. 13, 2024, 10:51 p.m. | OK | MS C++ 2017 | TESTS | 5 | 140 | 1433600 | ||
246293800 | ShroukAboalela | B | Feb. 13, 2024, 10:39 p.m. | OK | MS C++ 2017 | TESTS | 5 | 140 | 1638400 | ||
246314903 | xiaoxiaobo | B | Feb. 14, 2024, 5:41 a.m. | OK | MS C++ 2017 | TESTS | 5 | 140 | 1638400 | ||
246287366 | Yeasin_01 | B | Feb. 13, 2024, 8:51 p.m. | OK | Node.js | TESTS | 5 | 170 | 15872000 | ||
246261367 | gozeldowletowa2006 | B | Feb. 13, 2024, 5:15 p.m. | OK | PascalABC.NET | TESTS | 5 | 280 | 2662400 | ||
246316506 | muthm | B | Feb. 14, 2024, 5:58 a.m. | OK | Perl | TESTS | 5 | 217 | 38604800 | ||
246261578 | crapcode | B | Feb. 13, 2024, 5:16 p.m. | OK | PHP | TESTS | 5 | 46 | 27340800 | ||
246271861 | standoff | B | Feb. 13, 2024, 6:21 p.m. | OK | PyPy 3 | TESTS | 5 | 342 | 13209600 | ||
246292306 | xpoes | B | Feb. 13, 2024, 10:08 p.m. | OK | PyPy 3 | TESTS | 5 | 358 | 12697600 | ||
246287281 | _oO_Oo_ | B | Feb. 13, 2024, 8:50 p.m. | OK | PyPy 3 | TESTS | 5 | 358 | 13107200 | ||
246264996 | Ronstha | B | Feb. 13, 2024, 5:36 p.m. | OK | PyPy 3 | TESTS | 5 | 358 | 13619200 | ||
246267069 | ansun.sim | B | Feb. 13, 2024, 5:48 p.m. | OK | PyPy 3 | TESTS | 5 | 390 | 12800000 | ||
246299760 | ashays | B | Feb. 14, 2024, 1:17 a.m. | OK | PyPy 3 | TESTS | 5 | 436 | 12697600 | ||
246306279 | Syed_Muhammad_Mustafa | B | Feb. 14, 2024, 3:40 a.m. | OK | PyPy 3-64 | TESTS | 5 | 93 | 22835200 | ||
246265763 | gardengnome | B | Feb. 13, 2024, 5:40 p.m. | OK | PyPy 3-64 | TESTS | 5 | 93 | 22835200 | ||
246301538 | 1000101AKA69 | B | Feb. 14, 2024, 2:07 a.m. | OK | PyPy 3-64 | TESTS | 5 | 93 | 23142400 | ||
246272253 | jasmineheart | B | Feb. 13, 2024, 6:24 p.m. | OK | PyPy 3-64 | TESTS | 5 | 109 | 22016000 | ||
246293784 | NitroSpear | B | Feb. 13, 2024, 10:38 p.m. | OK | PyPy 3-64 | TESTS | 5 | 109 | 22835200 | ||
246262670 | CallMeGabe | B | Feb. 13, 2024, 5:22 p.m. | OK | PyPy 3-64 | TESTS | 5 | 109 | 22835200 | ||
246303146 | cybsbbb | B | Feb. 14, 2024, 2:42 a.m. | OK | PyPy 3-64 | TESTS | 5 | 109 | 28160000 | ||
246309472 | cperkkk | B | Feb. 14, 2024, 4:30 a.m. | OK | PyPy 3-64 | TESTS | 5 | 124 | 19046400 | ||
246277819 | jvatsal0709 | B | Feb. 13, 2024, 7:12 p.m. | OK | PyPy 3-64 | TESTS | 5 | 124 | 19353600 | ||
246274924 | Mahesh_4444 | B | Feb. 13, 2024, 6:45 p.m. | OK | PyPy 3-64 | TESTS | 5 | 124 | 19353600 | ||
246261475 | OLOGY | B | Feb. 13, 2024, 5:16 p.m. | OK | Python 2 | TESTS | 5 | 124 | 11673600 | ||
246279037 | Semenchuk | B | Feb. 13, 2024, 7:23 p.m. | OK | Python 3 | TESTS | 5 | 93 | 25497600 | ||
246262746 | asdfasfsdf2002 | B | Feb. 13, 2024, 5:22 p.m. | OK | Python 3 | TESTS | 5 | 108 | 25395200 | ||
246312979 | Krish_mittal | B | Feb. 14, 2024, 5:17 a.m. | OK | Python 3 | TESTS | 5 | 108 | 25497600 | ||
246273498 | v_shravan | B | Feb. 13, 2024, 6:33 p.m. | OK | Python 3 | TESTS | 5 | 108 | 25497600 | ||
246279003 | AryanGoel575 | B | Feb. 13, 2024, 7:22 p.m. | OK | Python 3 | TESTS | 5 | 109 | 25497600 | ||
246262344 | flameous | B | Feb. 13, 2024, 5:20 p.m. | OK | Python 3 | TESTS | 5 | 109 | 25497600 | ||
246279255 | momenelmesady4803 | B | Feb. 13, 2024, 7:25 p.m. | OK | Python 3 | TESTS | 5 | 109 | 26521600 | ||
246262600 | zhangbeihai03 | B | Feb. 13, 2024, 5:22 p.m. | OK | Python 3 | TESTS | 5 | 109 | 26521600 | ||
246272882 | Harsh_Ag23 | B | Feb. 13, 2024, 6:29 p.m. | OK | Python 3 | TESTS | 5 | 124 | 24985600 | ||
246301632 | qingfeng_r | B | Feb. 14, 2024, 2:09 a.m. | OK | Python 3 | TESTS | 5 | 124 | 25395200 |
Back to search problems