Codeforces Round 780 (Div. 3)

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
1660 Codeforces Round 780 (Div. 3) FINISHED False 8100 88529063 March 31, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 28371 ) B Vlad and Candies PROGRAMMING math

B'Not so long ago, Vlad had a birthday, for which he was presented with a package of candies. There were n types of candies, there are a_i candies of the type i ( 1 <= i <= n ). Vlad decided to eat exactly one candy every time, choosing any of the candies of a type that is currently the most frequent (if there are several such types, he can choose any of them). To get the maximum pleasure from eating, Vlad does not want to eat two candies of the same type in a row. Help him figure out if he can eat all the candies without eating two identical candies in a row. The first line of input data contains an integer t ( 1 <= t <= 10^4 ) -- the number of input test cases. The following is a description of t test cases of input, two lines for each. The first line of the case contains the single number n ( 1 <= n <= 2 cdot 10^5 ) -- the number of types of candies in the package. The second line of the case contains n integers a_i ( 1 <= a_i <= 10^9 ) -- the number of candies of the type i . It is guaranteed that the sum of n for all cases does not exceed 2 cdot 10^5 . Output t lines, each of which contains the answer to the corresponding test case of input. As an answer, output "YES" if Vlad can eat candy as planned, and "NO" otherwise. You can output the answer in any case (for example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer). In the first example, it is necessary to eat sweets in this order: In the second example, all the candies are of the same type and it is impossible to eat them without eating two identical ones in a row. In the third example, first of all, a candy of the type 2 will be eaten, after which this kind will remain the only kind that is the most frequent, and you will have to eat a candy of the type 2 again. '...

Tutorials

Codeforces Round #780 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
151584048 LeslieJRC B March 31, 2022, 4:38 p.m. OK GNU C11 TESTS 5 46 0
151590823 k2037319 B March 31, 2022, 4:59 p.m. OK GNU C11 TESTS 5 46 0
151588318 Abdul_Muyeed71 B March 31, 2022, 4:48 p.m. OK GNU C11 TESTS 5 46 819200
151593608 Akbar_23 B March 31, 2022, 5:21 p.m. OK GNU C11 TESTS 5 61 1638400
151585788 lazymystic B March 31, 2022, 4:43 p.m. OK GNU C11 TESTS 5 62 0
151590099 jahirulsarker01531 B March 31, 2022, 4:55 p.m. OK GNU C11 TESTS 5 62 0
151588015 yatharth_gupta1 B March 31, 2022, 4:47 p.m. OK GNU C11 TESTS 5 62 819200
151584423 Sadnur_Islam B March 31, 2022, 4:39 p.m. OK GNU C11 TESTS 5 62 819200
151585986 d19amine B March 31, 2022, 4:43 p.m. OK GNU C11 TESTS 5 62 819200
151618912 sanchita.mishra1718 B April 1, 2022, 2:14 a.m. OK GNU C11 TESTS 8 62 1638400
151618895 Remilia0231 B April 1, 2022, 2:14 a.m. OK GNU C++14 TESTS 8 15 1024000
151583769 swzlikefreedom B March 31, 2022, 4:37 p.m. OK GNU C++14 TESTS 5 46 0
151615977 Hush B April 1, 2022, 12:42 a.m. OK GNU C++14 TESTS 8 46 819200
151617762 lzj181134 B April 1, 2022, 1:42 a.m. OK GNU C++14 TESTS 8 46 819200
151586143 Zeuz... B March 31, 2022, 4:43 p.m. OK GNU C++14 TESTS 5 46 819200
151587581 lin.mou B March 31, 2022, 4:47 p.m. OK GNU C++14 TESTS 5 46 819200
151594899 zweix B March 31, 2022, 5:33 p.m. OK GNU C++14 TESTS 6 46 1638400
151629489 Powderqwq B April 1, 2022, 5:35 a.m. OK GNU C++14 TESTS 8 61 819200
151620851 meister_dem B April 1, 2022, 3:01 a.m. OK GNU C++14 TESTS 8 61 819200
151618402 1884613kjh B April 1, 2022, 2 a.m. OK GNU C++14 TESTS 8 61 819200
151605931 ABDULLAH_AL_MAHMUD_ARAF B March 31, 2022, 7:51 p.m. OK GNU C++17 TESTS 6 31 819200
151618034 wyhong3103 B April 1, 2022, 1:49 a.m. OK GNU C++17 TESTS 8 46 819200
151621176 elspy1218 B April 1, 2022, 3:09 a.m. OK GNU C++17 TESTS 8 46 819200
151608230 SentiKhor B March 31, 2022, 8:30 p.m. OK GNU C++17 TESTS 6 46 819200
151596112 butani_111 B March 31, 2022, 5:46 p.m. OK GNU C++17 TESTS 6 46 819200
151594405 Spacekiddx B March 31, 2022, 5:28 p.m. OK GNU C++17 TESTS 5 46 819200
151600913 waterball B March 31, 2022, 6:41 p.m. OK GNU C++17 TESTS 6 46 819200
151615966 Coffee_Into_Code B April 1, 2022, 12:42 a.m. OK GNU C++17 TESTS 8 46 1638400
151599823 Ahmad_Nour_Haidar B March 31, 2022, 6:28 p.m. OK GNU C++17 TESTS 6 46 3174400
151618166 Phantom_Knight B April 1, 2022, 1:53 a.m. OK GNU C++17 TESTS 8 46 3993600
151591650 Mr_Rex B March 31, 2022, 5:05 p.m. OK GNU C++17 (64) TESTS 5 31 819200
151621393 f20190766 B April 1, 2022, 3:15 a.m. OK GNU C++17 (64) TESTS 8 31 819200
151608813 neo_37 B March 31, 2022, 8:42 p.m. OK GNU C++17 (64) TESTS 6 31 819200
151600483 Noman_Amin B March 31, 2022, 6:36 p.m. OK GNU C++17 (64) TESTS 6 31 819200
151597708 pcms2 B March 31, 2022, 6:04 p.m. OK GNU C++17 (64) TESTS 6 31 819200
151593930 __Faima__ B March 31, 2022, 5:23 p.m. OK GNU C++17 (64) TESTS 5 31 819200
151608687 Bl_dem B March 31, 2022, 8:39 p.m. OK GNU C++17 (64) TESTS 6 31 1638400
151607109 keijak B March 31, 2022, 8:10 p.m. OK GNU C++17 (64) TESTS 6 31 1638400
151605924 Mosharrof13 B March 31, 2022, 7:51 p.m. OK GNU C++17 (64) TESTS 6 31 1638400
151604777 OmarNabill B March 31, 2022, 7:34 p.m. OK GNU C++17 (64) TESTS 6 31 1638400
151616293 TWNWAKing B April 1, 2022, 12:52 a.m. OK GNU C++20 (64) TESTS 8 15 2662400
151596325 Maango16 B March 31, 2022, 5:48 p.m. OK GNU C++20 (64) TESTS 6 30 0
151600856 justcode B March 31, 2022, 6:40 p.m. OK GNU C++20 (64) TESTS 6 31 0
151614286 Githm B March 31, 2022, 11:34 p.m. OK GNU C++20 (64) TESTS 8 31 0
151629170 Giulian617 B April 1, 2022, 5:31 a.m. OK GNU C++20 (64) TESTS 8 31 819200
151629200 tanmay_212 B April 1, 2022, 5:31 a.m. OK GNU C++20 (64) TESTS 8 31 819200
151629653 danwuSBU B April 1, 2022, 5:37 a.m. OK GNU C++20 (64) TESTS 8 31 819200
151629816 vonat1us B April 1, 2022, 5:39 a.m. OK GNU C++20 (64) TESTS 8 31 819200
151630798 kodershut B April 1, 2022, 5:52 a.m. OK GNU C++20 (64) TESTS 8 31 819200
151630930 wumbus B April 1, 2022, 5:54 a.m. OK GNU C++20 (64) TESTS 8 31 819200
151613038 professo B March 31, 2022, 10:27 p.m. OK Go TESTS 8 186 4300800
151613066 professo B March 31, 2022, 10:28 p.m. OK Go TESTS 8 186 4300800
151606770 ssvb B March 31, 2022, 8:05 p.m. OK Go TESTS 6 264 4300800
151612853 Satyaa B March 31, 2022, 10:20 p.m. OK Java 11 TESTS 8 186 0
151587813 Cartoonshow B March 31, 2022, 4:47 p.m. OK Java 11 TESTS 5 202 3174400
151619766 MrBruh420 B April 1, 2022, 2:35 a.m. OK Java 11 TESTS 8 217 3174400
151628910 __Serendipity B April 1, 2022, 5:27 a.m. OK Java 11 TESTS 8 217 3174400
151583902 Saell B March 31, 2022, 4:38 p.m. OK Java 11 TESTS 5 217 4300800
151598727 MrOtter B March 31, 2022, 6:15 p.m. OK Java 11 TESTS 6 218 3174400
151591288 Push_back7 B March 31, 2022, 5:02 p.m. OK Java 11 TESTS 5 248 3993600
151596390 StaleBread B March 31, 2022, 5:49 p.m. OK Java 11 TESTS 6 249 3891200
151590634 Eslam_Ahmed B March 31, 2022, 4:58 p.m. OK Java 11 TESTS 5 249 3891200
151597797 yudi23 B March 31, 2022, 6:05 p.m. OK Java 11 TESTS 6 264 3174400
151590856 Jason_Is_Here B March 31, 2022, 4:59 p.m. OK Java 8 TESTS 5 124 11468800
151627058 Allinonyou B April 1, 2022, 4:59 a.m. OK Java 8 TESTS 8 140 11161600
151604674 Karakurik B March 31, 2022, 7:33 p.m. OK Java 8 TESTS 6 140 11468800
151598149 adeon B March 31, 2022, 6:09 p.m. OK Java 8 TESTS 6 140 11468800
151603240 NatInTheHat B March 31, 2022, 7:12 p.m. OK Java 8 TESTS 6 155 11468800
151605886 Shemo B March 31, 2022, 7:51 p.m. OK Java 8 TESTS 6 156 11468800
151623982 NullOne_Lee B April 1, 2022, 4:09 a.m. OK Java 8 TESTS 8 202 0
151630018 pribic B April 1, 2022, 5:42 a.m. OK Java 8 TESTS 8 202 11468800
151609308 Koka B March 31, 2022, 8:52 p.m. OK Java 8 TESTS 8 202 12902400
151587288 instanceof B March 31, 2022, 4:46 p.m. OK Java 8 TESTS 5 234 13824000
151614492 hanel1164 B March 31, 2022, 11:42 p.m. OK Kotlin 1.4 TESTS 8 170 14643200
151623140 korniltsev.anatoly B April 1, 2022, 3:52 a.m. OK Kotlin 1.5 TESTS 8 529 1536000
151592186 ico2k2 B March 31, 2022, 5:09 p.m. OK MS C++ 2017 TESTS 5 93 0
151606263 omar_odai B March 31, 2022, 7:56 p.m. OK MS C++ 2017 TESTS 6 187 0
151594569 lhfei B March 31, 2022, 5:30 p.m. OK MS C++ 2017 TESTS 6 187 819200
151622032 vmffotltka B April 1, 2022, 3:28 a.m. OK MS C++ 2017 TESTS 8 187 819200
151611144 Yanchiik B March 31, 2022, 9:36 p.m. OK MS C++ 2017 TESTS 8 187 819200
151606359 omar_odai B March 31, 2022, 7:58 p.m. OK MS C++ 2017 TESTS 6 202 0
151585386 Ncato_Del_Gormo7 B March 31, 2022, 4:42 p.m. OK MS C++ 2017 TESTS 5 202 819200
151613557 TawfekHesham B March 31, 2022, 10:45 p.m. OK MS C++ 2017 TESTS 8 202 4505600
151630030 ArMath B April 1, 2022, 5:42 a.m. OK MS C++ 2017 TESTS 8 218 819200
151627456 gzhu_first_shenqing B April 1, 2022, 5:05 a.m. OK MS C++ 2017 TESTS 8 218 921600
151603622 tobis B March 31, 2022, 7:17 p.m. OK .NET Core C# TESTS 6 93 24064000
151603949 tobis B March 31, 2022, 7:22 p.m. OK .NET Core C# TESTS 6 108 24064000
151583681 jami_hq111 B March 31, 2022, 4:37 p.m. OK .NET Core C# TESTS 5 108 24166400
151593309 Hacker_kali B March 31, 2022, 5:18 p.m. OK PascalABC.NET TESTS 5 436 4096000
151598864 grawlixes B March 31, 2022, 6:17 p.m. OK PyPy 3 TESTS 6 280 17408000
151618107 fiblonaria B April 1, 2022, 1:52 a.m. OK PyPy 3 TESTS 8 280 19046400
151604597 Pythonic__Python B March 31, 2022, 7:32 p.m. OK PyPy 3 TESTS 6 280 19148800
151596986 crapcode B March 31, 2022, 5:56 p.m. OK PyPy 3 TESTS 6 311 18227200
151591082 HIT_Cyclone317 B March 31, 2022, 5:01 p.m. OK PyPy 3 TESTS 5 358 17305600
151592580 akshat11 B March 31, 2022, 5:12 p.m. OK PyPy 3 TESTS 5 374 19046400
151613553 amineelokri10 zro9i __TheKing B March 31, 2022, 10:45 p.m. OK PyPy 3 TESTS 8 405 18022400
151602437 stardust.skg B March 31, 2022, 7:01 p.m. OK PyPy 3 TESTS 6 405 19046400
151586240 curious600171 B March 31, 2022, 4:44 p.m. OK PyPy 3 TESTS 5 420 19046400
151618638 Midhilesh B April 1, 2022, 2:07 a.m. OK PyPy 3 TESTS 8 483 19046400
151605798 notTehlka B March 31, 2022, 7:50 p.m. OK PyPy 3-64 TESTS 6 124 28876800
151596114 Mashin_larner B March 31, 2022, 5:46 p.m. OK PyPy 3-64 TESTS 6 124 29593600
151625260 sakshatmali B April 1, 2022, 4:33 a.m. OK PyPy 3-64 TESTS 8 140 25702400
151590957 190330228 B March 31, 2022, 5 p.m. OK PyPy 3-64 TESTS 5 249 22323200
151588704 radoan.sharkar.richi B March 31, 2022, 4:49 p.m. OK PyPy 3-64 TESTS 5 249 22425600
151621599 Liberator187 B April 1, 2022, 3:19 a.m. OK PyPy 3-64 TESTS 8 249 28364800
151607953 satyamshrma B March 31, 2022, 8:25 p.m. OK PyPy 3-64 TESTS 6 249 29696000
151622697 stand_by B April 1, 2022, 3:42 a.m. OK PyPy 3-64 TESTS 8 264 30003200
151604338 Mosfak_Motin_Rimon B March 31, 2022, 7:28 p.m. OK PyPy 3-64 TESTS 6 280 23449600
151603261 Himanshu_Kaithal B March 31, 2022, 7:12 p.m. OK PyPy 3-64 TESTS 6 327 28262400
151590258 Block_Cipher B March 31, 2022, 4:55 p.m. OK Python 3 TESTS 5 124 16998400
151620712 B20274 B April 1, 2022, 2:57 a.m. OK Python 3 TESTS 8 140 15667200
151592665 Ahmed_Abdelrazik B March 31, 2022, 5:12 p.m. OK Python 3 TESTS 5 140 17203200
151585232 ankits1613 B March 31, 2022, 4:41 p.m. OK Python 3 TESTS 5 140 17203200
151590732 AbhayTiwari007 B March 31, 2022, 4:58 p.m. OK Python 3 TESTS 5 140 17305600
151624658 Lhohelhohehmm B April 1, 2022, 4:22 a.m. OK Python 3 TESTS 8 140 17715200
151605394 math_tsunami B March 31, 2022, 7:44 p.m. OK Python 3 TESTS 6 155 14233600
151595342 harshitkapoor B March 31, 2022, 5:38 p.m. OK Python 3 TESTS 6 155 16486400
151608697 sp_Piyush B March 31, 2022, 8:39 p.m. OK Python 3 TESTS 6 155 16998400
151605959 pnmanh75 B March 31, 2022, 7:52 p.m. OK Python 3 TESTS 6 155 16998400
151604756 cwlo2f B March 31, 2022, 7:34 p.m. OK Rust 2021 TESTS 6 78 819200
151592933 Hyrulia B March 31, 2022, 5:15 p.m. OK Rust 2021 TESTS 5 109 6860800

remove filters

Back to search problems