Codeforces Round 661 (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
1399 Codeforces Round 661 (Div. 3) FINISHED False 8100 135185099 Aug. 5, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 67427 ) A Remove Smallest PROGRAMMING greedy sortings

B'You are given the array a consisting of n positive (greater than zero) integers. In one move, you can choose two indices i and j ( i ne j ) such that the absolute difference between a_i and a_j is no more than one ( |a_i - a_j| <= 1 ) and remove the smallest of these two elements. If two elements are equal, you can remove any of them (but exactly one). Your task is to find if it is possible to obtain the array consisting of only one element using several (possibly, zero) such moves or not. You have to answer t independent test cases. The first line of the input contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. Then t test cases follow. The first line of the test case contains one integer n ( 1 <= n <= 50 ) -- the length of a . The second line of the test case contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 100 ), where a_i is the i -th element of a . For each test case, print the answer: "YES" if it is possible to obtain the array consisting of only one element using several (possibly, zero) moves described in the problem statement, or "NO" otherwise. In the first test case of the example, we can perform the following sequence of moves: In the second test case of the example, we can choose any possible i and j any move and it doesn 't matter which element we remove. In the third test case of the example, there is no way to get rid of 2 and 4 . '...

Tutorials

Codeforces Round #661 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
90485694 vikhyat_123 A Aug. 20, 2020, 5:31 p.m. OK Clang++17 Diagnostics TESTS 4 108 307200
90858032 yreb A Aug. 24, 2020, 8:34 p.m. OK Clang++17 Diagnostics TESTS 4 109 0
90311977 KRISH99 A Aug. 18, 2020, 1:32 p.m. OK Clang++17 Diagnostics TESTS 4 124 0
91490659 coelho A Aug. 31, 2020, 12:37 p.m. OK Clang++17 Diagnostics TESTS 4 140 3174400
89989609 fpc_coder A Aug. 15, 2020, 5:51 a.m. OK FPC TESTS 4 30 0
90467211 Sabikun_Zerin A Aug. 20, 2020, 1:42 p.m. OK GNU C11 TESTS 4 15 0
90470788 Aakash_V A Aug. 20, 2020, 2:23 p.m. OK GNU C11 TESTS 4 15 0
90850840 ajtamjid A Aug. 24, 2020, 6 p.m. OK GNU C11 TESTS 4 15 0
91064126 simran145 A Aug. 26, 2020, 2:44 p.m. OK GNU C11 TESTS 4 15 0
90453908 dznzzl A Aug. 20, 2020, 10:28 a.m. OK GNU C11 TESTS 4 15 0
91073982 minannu A Aug. 26, 2020, 4:19 p.m. OK GNU C11 TESTS 4 15 0
91082431 agrawalakshay68 A Aug. 26, 2020, 6:04 p.m. OK GNU C11 TESTS 4 15 0
91582920 ITIS_TC A Sept. 1, 2020, 4:12 p.m. OK GNU C11 TESTS 4 15 0
91656414 fullcomding A Sept. 2, 2020, 3:53 p.m. OK GNU C11 TESTS 4 15 0
91670236 aurchey726 A Sept. 2, 2020, 7:18 p.m. OK GNU C11 TESTS 4 15 0
91545398 2019kucp1001 A Sept. 1, 2020, 7:37 a.m. OK GNU C++11 TESTS 4 15 0
91496029 AstorWU A Aug. 31, 2020, 1:43 p.m. OK GNU C++11 TESTS 4 15 0
91081511 DiegoMont A Aug. 26, 2020, 5:50 p.m. OK GNU C++11 TESTS 4 15 0
91044343 cheng08032005Strange A Aug. 26, 2020, 11:13 a.m. OK GNU C++11 TESTS 4 15 0
91035421 Megrez.P A Aug. 26, 2020, 9:10 a.m. OK GNU C++11 TESTS 4 15 0
91014270 luogu_bot3 A Aug. 26, 2020, 3:45 a.m. OK GNU C++11 TESTS 4 15 0
91695089 Igor_Zielinski A Sept. 3, 2020, 7:09 a.m. OK GNU C++11 TESTS 4 15 0
91668904 MediaBilly A Sept. 2, 2020, 6:54 p.m. OK GNU C++11 TESTS 4 15 0
91649666 MiyauchiRenge A Sept. 2, 2020, 2:31 p.m. OK GNU C++11 TESTS 4 15 0
91611460 tengant A Sept. 2, 2020, 4:50 a.m. OK GNU C++11 TESTS 4 15 0
91511676 warrior_25 A Aug. 31, 2020, 4:58 p.m. OK GNU C++14 TESTS 4 15 0
91626620 hrishikaulwar A Sept. 2, 2020, 9:06 a.m. OK GNU C++14 TESTS 4 15 0
91686162 Last_whisper A Sept. 3, 2020, 4:21 a.m. OK GNU C++14 TESTS 4 15 0
91687443 Mridul_Bhardwaj A Sept. 3, 2020, 4:53 a.m. OK GNU C++14 TESTS 4 15 0
91707451 rexa308 A Sept. 3, 2020, 10:18 a.m. OK GNU C++14 TESTS 4 15 0
91708116 SharanV A Sept. 3, 2020, 10:28 a.m. OK GNU C++14 TESTS 4 15 0
91493235 Shaggy23 A Aug. 31, 2020, 1:10 p.m. OK GNU C++14 TESTS 4 15 0
91307984 deodeo A Aug. 29, 2020, 7:09 p.m. OK GNU C++14 TESTS 4 15 0
91239147 rohith_1 A Aug. 28, 2020, 7:10 p.m. OK GNU C++14 TESTS 4 15 0
91208404 samarth5611 A Aug. 28, 2020, 12:47 p.m. OK GNU C++14 TESTS 4 15 0
91620039 karankamboj A Sept. 2, 2020, 7:18 a.m. OK GNU C++17 TESTS 4 15 0
91656387 parth_chovatiya A Sept. 2, 2020, 3:52 p.m. OK GNU C++17 TESTS 4 15 0
91647936 pranavkumar1423 A Sept. 2, 2020, 2:10 p.m. OK GNU C++17 TESTS 4 15 0
91636620 THSoracle2000 A Sept. 2, 2020, 11:40 a.m. OK GNU C++17 TESTS 4 15 0
91612093 _Anonymous94094 A Sept. 2, 2020, 5:02 a.m. OK GNU C++17 TESTS 4 15 0
91550007 clintam123 A Sept. 1, 2020, 8:47 a.m. OK GNU C++17 TESTS 4 15 0
91531764 jsparmar01 A Sept. 1, 2020, 2:39 a.m. OK GNU C++17 TESTS 4 15 0
91276682 jason11235 A Aug. 29, 2020, 10:33 a.m. OK GNU C++17 TESTS 4 15 0
91113623 fuck_the_luck A Aug. 27, 2020, 7:47 a.m. OK GNU C++17 TESTS 4 15 0
91083683 naim6246 A Aug. 26, 2020, 6:24 p.m. OK GNU C++17 TESTS 4 15 0
90299195 KBC A Aug. 18, 2020, 10:39 a.m. OK GNU C++17 (64) TESTS 4 0 0
90877866 87ouo A Aug. 25, 2020, 7:27 a.m. OK GNU C++17 (64) TESTS 4 15 0
90994397 judgme_nt A Aug. 25, 2020, 6:11 p.m. OK GNU C++17 (64) TESTS 4 15 0
91047864 GrowingSugar925 A Aug. 26, 2020, 11:58 a.m. OK GNU C++17 (64) TESTS 4 15 0
91189679 Sudipta_Trisha A Aug. 28, 2020, 7:58 a.m. OK GNU C++17 (64) TESTS 4 15 0
91558284 vjudge2 A Sept. 1, 2020, 10:58 a.m. OK GNU C++17 (64) TESTS 4 15 0
91619265 vjudge1 A Sept. 2, 2020, 7:05 a.m. OK GNU C++17 (64) TESTS 4 15 0
91656031 ChethanJ A Sept. 2, 2020, 3:48 p.m. OK GNU C++17 (64) TESTS 4 15 0
91690686 Scissors_Ss A Sept. 3, 2020, 5:55 a.m. OK GNU C++17 (64) TESTS 4 15 0
90475770 Crazy_hedgehog A Aug. 20, 2020, 3:21 p.m. OK GNU C++17 (64) TESTS 4 15 0
90724582 vchilikov A Aug. 23, 2020, 3:17 a.m. OK Go TESTS 4 15 10649600
91547598 BamgoeSN A Sept. 1, 2020, 8:11 a.m. OK Go TESTS 4 31 0
91697367 qinpeng A Sept. 3, 2020, 7:44 a.m. OK Go TESTS 4 31 204800
91673789 bnurgeldiyev514 A Sept. 2, 2020, 8:42 p.m. OK Go TESTS 4 46 0
90724415 vchilikov A Aug. 23, 2020, 3:12 a.m. OK Go TESTS 4 46 10854400
91587384 Yash_Jain A Sept. 1, 2020, 5:08 p.m. OK Go TESTS 4 218 0
90095282 Rushn A Aug. 16, 2020, 2:42 p.m. OK Go TESTS 4 248 0
90516351 CtrlCV A Aug. 21, 2020, 8:47 a.m. OK Go TESTS 4 280 10649600
91036587 MC47 A Aug. 26, 2020, 9:25 a.m. OK Haskell TESTS 4 31 0
90051106 B_w_c A Aug. 16, 2020, 1:25 a.m. OK Haskell TESTS 4 31 0
90051129 B_w_c A Aug. 16, 2020, 1:26 a.m. OK Haskell TESTS 4 46 0
90877717 jthvai A Aug. 25, 2020, 7:25 a.m. OK Haskell TESTS 4 62 1126400
90256989 TheManWithNoName A Aug. 17, 2020, 6:42 p.m. OK Java 11 TESTS 4 139 0
91089278 stormovik A Aug. 26, 2020, 8:14 p.m. OK Java 11 TESTS 4 170 0
90994732 Pratyush_K A Aug. 25, 2020, 6:16 p.m. OK Java 11 TESTS 4 171 0
90425918 Ruins A Aug. 20, 2020, 1:12 a.m. OK Java 11 TESTS 4 171 0
90048127 sushant19450 A Aug. 15, 2020, 10:27 p.m. OK Java 11 TESTS 4 171 0
90437480 _mint_ A Aug. 20, 2020, 6:19 a.m. OK Java 11 TESTS 4 186 0
90704357 mzeng A Aug. 22, 2020, 4:39 p.m. OK Java 11 TESTS 4 186 23859200
90670251 GaussFan A Aug. 22, 2020, 8:32 a.m. OK Java 11 TESTS 4 186 23859200
90983873 elleryqueenhomels A Aug. 25, 2020, 4:35 p.m. OK Java 11 TESTS 4 187 0
90415698 Bhaskar13 A Aug. 19, 2020, 6:58 p.m. OK Java 11 TESTS 4 187 0
91610501 wannacry123 A Sept. 2, 2020, 4:28 a.m. OK Java 8 TESTS 4 93 0
90040274 AnandOza A Aug. 15, 2020, 6:21 p.m. OK Java 8 TESTS 4 93 0
90753140 rizqycf27 A Aug. 23, 2020, 12:06 p.m. OK Java 8 TESTS 4 93 20684800
90709751 vjudge1 A Aug. 22, 2020, 6:08 p.m. OK Java 8 TESTS 4 93 20684800
90612096 AyushiVerma A Aug. 21, 2020, 4:22 p.m. OK Java 8 TESTS 4 93 20787200
91309729 MaxHeap A Aug. 29, 2020, 7:49 p.m. OK Java 8 TESTS 4 108 0
91220883 siyasingh A Aug. 28, 2020, 3:11 p.m. OK Java 8 TESTS 4 108 0
91000402 andrewzheng A Aug. 25, 2020, 7:55 p.m. OK Java 8 TESTS 4 108 0
90408213 Me146 A Aug. 19, 2020, 4:54 p.m. OK Java 8 TESTS 4 108 0
90182546 abdelrahmanfekri A Aug. 17, 2020, 12:22 a.m. OK Java 8 TESTS 4 108 0
90040959 cokifigue A Aug. 15, 2020, 6:36 p.m. OK JavaScript TESTS 4 46 1638400
91307677 Mirimax A Aug. 29, 2020, 7:04 p.m. OK Kotlin TESTS 4 140 409600
90046677 maxoverhere A Aug. 15, 2020, 9:19 p.m. OK Kotlin TESTS 4 171 1126400
90040504 Jothef A Aug. 15, 2020, 6:26 p.m. OK Kotlin TESTS 4 171 1126400
90294374 chanter A Aug. 18, 2020, 9:28 a.m. OK Kotlin TESTS 4 186 0
91519997 m1_k3 A Aug. 31, 2020, 7:22 p.m. OK Mono C# TESTS 4 46 0
90717980 the-mover A Aug. 22, 2020, 9:48 p.m. OK Mono C# TESTS 4 46 13926400
90352626 diegohernanbogado A Aug. 19, 2020, 2:36 a.m. OK Mono C# TESTS 4 61 5324800
90792931 VisiOrigin A Aug. 24, 2020, 3:38 a.m. OK Mono C# TESTS 4 61 13926400
91594946 daniilkhokho A Sept. 1, 2020, 7:09 p.m. OK Mono C# TESTS 4 62 1536000
90073300 lizirukh A Aug. 16, 2020, 10:02 a.m. OK Mono C# TESTS 4 62 5427200
90254467 Sharaf_1015 A Aug. 17, 2020, 5:59 p.m. OK Mono C# TESTS 4 62 5836800
90685626 zeinab A Aug. 22, 2020, 12:04 p.m. OK Mono C# TESTS 4 62 14131200
90199796 Mosyagin A Aug. 17, 2020, 6:23 a.m. OK Mono C# TESTS 4 77 1126400
90210813 hhsaffar A Aug. 17, 2020, 8:49 a.m. OK Mono C# TESTS 4 77 5324800
91286318 L_A_Z_Y.113 A Aug. 29, 2020, 1:08 p.m. OK MS C++ TESTS 4 31 0
90646093 hmn1995 A Aug. 22, 2020, 2:04 a.m. OK MS C++ TESTS 4 31 3891200
90425762 vjudge1 A Aug. 20, 2020, 1:05 a.m. OK MS C++ TESTS 4 46 0
90466041 aalakhtin A Aug. 20, 2020, 1:26 p.m. OK MS C++ 2017 TESTS 4 15 0
91079213 SakolchikA A Aug. 26, 2020, 5:16 p.m. OK MS C++ 2017 TESTS 4 30 0
91604192 suru49 A Sept. 2, 2020, 12:44 a.m. OK MS C++ 2017 TESTS 4 30 0
90226446 Miclos A Aug. 17, 2020, 12:16 p.m. OK MS C++ 2017 TESTS 4 30 0
90474529 RightRat A Aug. 20, 2020, 3:08 p.m. OK MS C++ 2017 TESTS 4 30 0
90890716 rrvg A Aug. 25, 2020, 10:32 a.m. OK MS C++ 2017 TESTS 4 30 0
90695790 kaixuanleo A Aug. 22, 2020, 2:37 p.m. OK MS C++ 2017 TESTS 4 30 3686400
91447523 naresh1919 A Aug. 31, 2020, 1:55 a.m. OK MS C++ 2017 TESTS 4 30 3686400
91613230 registuv A Sept. 2, 2020, 5:24 a.m. OK MS C++ 2017 TESTS 4 31 0
91699474 gao_wu_di A Sept. 3, 2020, 8:14 a.m. OK MS C++ 2017 TESTS 4 31 0
91559917 Spelot A Sept. 1, 2020, 11:22 a.m. OK Node.js TESTS 4 77 1945600
91558699 Spelot A Sept. 1, 2020, 11:04 a.m. OK Node.js TESTS 4 93 1740800
90863937 japyscript A Aug. 25, 2020, 3:03 a.m. OK Node.js TESTS 4 93 1843200
90699469 Fatelon A Aug. 22, 2020, 3:27 p.m. OK Node.js TESTS 4 108 14438400
90456145 roman.khabibulin A Aug. 20, 2020, 11:02 a.m. OK PHP TESTS 4 31 0
91230441 yumtam A Aug. 28, 2020, 4:57 p.m. OK PyPy 2 TESTS 4 124 819200
90872797 rkat7 A Aug. 25, 2020, 6:14 a.m. OK PyPy 2 TESTS 4 124 2150400
89992003 O__________O A Aug. 15, 2020, 6:25 a.m. OK PyPy 2 TESTS 4 186 1433600
91697360 vadym.kaidalov A Sept. 3, 2020, 7:44 a.m. OK PyPy 3 TESTS 4 139 2048000
90383522 aberent A Aug. 19, 2020, 11:28 a.m. OK PyPy 3 TESTS 4 139 2252800
90266098 MA123 A Aug. 17, 2020, 10:42 p.m. OK PyPy 3 TESTS 4 155 1638400
90366137 ashish_sasmal A Aug. 19, 2020, 7:13 a.m. OK PyPy 3 TESTS 4 155 2252800
90377377 Naman_Tyagi A Aug. 19, 2020, 9:57 a.m. OK PyPy 3 TESTS 4 155 2764800
91699295 vadym.kaidalov A Sept. 3, 2020, 8:12 a.m. OK PyPy 3 TESTS 4 170 2355200
91204010 cpicard443 A Aug. 28, 2020, 11:42 a.m. OK PyPy 3 TESTS 4 170 2764800
91684613 jdiamond A Sept. 3, 2020, 3:39 a.m. OK PyPy 3 TESTS 4 171 2662400
91100084 SubsTheTechnomancer A Aug. 27, 2020, 3:28 a.m. OK PyPy 3 TESTS 4 186 3276800
91515530 cfcfcfcfcf A Aug. 31, 2020, 5:56 p.m. OK PyPy 3 TESTS 4 186 4096000
90254971 hopper19 A Aug. 17, 2020, 6:07 p.m. OK Python 2 TESTS 4 155 102400
90361631 shweta_pardeshi A Aug. 19, 2020, 6:07 a.m. OK Python 3 TESTS 4 78 307200
90666564 jyotijangid A Aug. 22, 2020, 7:44 a.m. OK Python 3 TESTS 4 78 6656000
91609350 snackpanda A Sept. 2, 2020, 3:59 a.m. OK Python 3 TESTS 4 93 0
91577398 Riya_1220 A Sept. 1, 2020, 3:05 p.m. OK Python 3 TESTS 4 93 0
91562743 miara_ak A Sept. 1, 2020, noon OK Python 3 TESTS 4 93 0
91237093 Dmitrii5 A Aug. 28, 2020, 6:34 p.m. OK Python 3 TESTS 4 93 0
91094864 amrayman A Aug. 26, 2020, 11:49 p.m. OK Python 3 TESTS 4 93 0
91021695 shivam2345 A Aug. 26, 2020, 6:03 a.m. OK Python 3 TESTS 4 93 0
90468084 jaswantharyaa A Aug. 20, 2020, 1:53 p.m. OK Python 3 TESTS 4 93 0
90459167 Timmy84638 A Aug. 20, 2020, 11:47 a.m. OK Python 3 TESTS 4 93 0
90432746 notAProgrammer_NAP A Aug. 20, 2020, 4:47 a.m. OK Ruby TESTS 4 468 819200
90303873 piyushsawaria A Aug. 18, 2020, 11:43 a.m. OK Ruby TESTS 4 499 204800
90468672 Timmy84638 A Aug. 20, 2020, 2 p.m. OK Ruby TESTS 4 514 204800
90272181 tigrat A Aug. 18, 2020, 3:05 a.m. OK Rust TESTS 4 31 0
90170916 Ballu-Bhai A Aug. 16, 2020, 7:15 p.m. OK Rust TESTS 4 31 0
90772301 survived A Aug. 23, 2020, 4:25 p.m. OK Rust TESTS 4 31 3788800
90088751 buenasdiaz A Aug. 16, 2020, 2:24 p.m. OK Scala TESTS 4 530 0

remove filters

Back to search problems