CodeCraft-22 and Codeforces Round 795 (Div. 2)

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
1691 CodeCraft-22 and Codeforces Round 795 (Div. 2) FINISHED False 7200 77815499 May 31, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 30656 ) A Beat The Odds PROGRAMMING constructive algorithms greedy math

B'Given a sequence a_1, a_2, ldots, a_n , find the minimum number of elements to remove from the sequence such that after the removal, the sum of every 2 consecutive elements is even. Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. Description of the test cases follows. The first line of each test case contains a single integer n ( 3 <= n <= 10^5 ). The second line of each test case contains n integers a_1, a_2, ... ,a_n ( 1 <= q a_i <= q10^9 ) -- elements of the sequence. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, print a single integer -- the minimum number of elements to remove from the sequence such that the sum of every 2 consecutive elements is even. In the first test case, after removing 3 , the sequence becomes [2,4,6,8] . The pairs of consecutive elements are {[2, 4], [4, 6], [6, 8] } . Each consecutive pair has an even sum now. Hence, we only need to remove 1 element to satisfy the condition asked. In the second test case, each consecutive pair already has an even sum so we need not remove any element. '...

Tutorials

Editorial for CodeCraft-22 and Codeforces Round #795 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
159163081 Lank A June 1, 2022, 1:01 p.m. OK Clang++17 Diagnostics TESTS 18 529 409600
159166056 d3LtaTH A June 1, 2022, 1:34 p.m. OK Clang++17 Diagnostics TESTS 18 561 409600
159182333 bercolax A June 1, 2022, 4:42 p.m. OK GNU C11 TESTS 18 31 0
159153592 yatharth_gupta1 A June 1, 2022, 11:10 a.m. OK GNU C11 TESTS 18 31 409600
159159854 UttamAmit A June 1, 2022, 12:24 p.m. OK GNU C11 TESTS 18 31 409600
159131023 chaitanya__dua A June 1, 2022, 6:53 a.m. OK GNU C11 TESTS 18 31 409600
159151056 Yugayu_2021506 A June 1, 2022, 10:41 a.m. OK GNU C11 TESTS 18 31 409600
159136051 TomoriNao A June 1, 2022, 7:55 a.m. OK GNU C++14 TESTS 18 15 2867200
159216446 Akshay1323 A June 2, 2022, 5:44 a.m. OK GNU C++14 TESTS 18 30 409600
159195972 Valters07 A June 1, 2022, 7:53 p.m. OK GNU C++14 TESTS 18 31 0
159175066 expert_to_be A June 1, 2022, 3:18 p.m. OK GNU C++14 TESTS 18 31 0
159171814 leiluoqi A June 1, 2022, 2:37 p.m. OK GNU C++14 TESTS 18 31 0
159196951 Abdallah_Kamal.10 A June 1, 2022, 8:14 p.m. OK GNU C++14 TESTS 18 31 0
159188441 Njaso A June 1, 2022, 5:57 p.m. OK GNU C++14 TESTS 18 31 0
159201033 youssef7ussien A June 1, 2022, 9:59 p.m. OK GNU C++14 TESTS 18 31 0
159206395 ankitraj A June 2, 2022, 1:40 a.m. OK GNU C++14 TESTS 18 31 0
159215585 mibbp A June 2, 2022, 5:30 a.m. OK GNU C++14 TESTS 18 31 0
159201013 Aman011 A June 1, 2022, 9:58 p.m. OK GNU C++17 TESTS 18 31 0
159181899 Madd_Stalin A June 1, 2022, 4:36 p.m. OK GNU C++17 TESTS 18 31 0
159177295 currentlyinuse A June 1, 2022, 3:45 p.m. OK GNU C++17 TESTS 18 31 0
159174960 flyyyLV A June 1, 2022, 3:17 p.m. OK GNU C++17 TESTS 18 31 0
159170662 pranay7 A June 1, 2022, 2:25 p.m. OK GNU C++17 TESTS 18 31 0
159215227 AlveRahman A June 2, 2022, 5:24 a.m. OK GNU C++17 TESTS 18 31 0
159213435 Fa_HD A June 2, 2022, 4:52 a.m. OK GNU C++17 TESTS 18 31 0
159208882 y1bbb A June 2, 2022, 3 a.m. OK GNU C++17 TESTS 18 31 0
159201219 AbdulrahmanElfeky A June 1, 2022, 10:05 p.m. OK GNU C++17 TESTS 18 31 0
159215688 Jaki A June 2, 2022, 5:32 a.m. OK GNU C++17 TESTS 18 31 0
159160900 xericha A June 1, 2022, 12:36 p.m. OK GNU C++17 (64) TESTS 18 15 0
159214107 Ayush478 A June 2, 2022, 5:04 a.m. OK GNU C++17 (64) TESTS 18 15 409600
159183630 devesh_21 A June 1, 2022, 4:58 p.m. OK GNU C++17 (64) TESTS 18 15 409600
159145753 Steins__Gate A June 1, 2022, 9:43 a.m. OK GNU C++17 (64) TESTS 18 15 409600
159186361 hocusPocus_abrakadabra A June 1, 2022, 5:31 p.m. OK GNU C++17 (64) TESTS 18 30 0
159199269 ppm.floss A June 1, 2022, 9:10 p.m. OK GNU C++17 (64) TESTS 18 30 0
159181998 diall_38 A June 1, 2022, 4:38 p.m. OK GNU C++17 (64) TESTS 18 30 0
159161753 Andreasyan A June 1, 2022, 12:46 p.m. OK GNU C++17 (64) TESTS 18 30 0
159151595 youtsuha A June 1, 2022, 10:47 a.m. OK GNU C++17 (64) TESTS 18 30 0
159197892 Albn A June 1, 2022, 8:34 p.m. OK GNU C++17 (64) TESTS 18 30 409600
159186508 NazhmudinovTRLI A June 1, 2022, 5:33 p.m. OK GNU C++20 (64) TESTS 18 15 0
159181893 juver A June 1, 2022, 4:36 p.m. OK GNU C++20 (64) TESTS 18 15 0
159176467 strek6 A June 1, 2022, 3:35 p.m. OK GNU C++20 (64) TESTS 18 15 0
159174945 restless A June 1, 2022, 3:17 p.m. OK GNU C++20 (64) TESTS 18 15 0
159173291 iishrak_abir A June 1, 2022, 2:55 p.m. OK GNU C++20 (64) TESTS 18 15 0
159204968 stricks A June 2, 2022, 12:44 a.m. OK GNU C++20 (64) TESTS 18 15 0
159207175 ap_2089 A June 2, 2022, 2:07 a.m. OK GNU C++20 (64) TESTS 18 15 0
159208118 LuoHaiDong A June 2, 2022, 2:38 a.m. OK GNU C++20 (64) TESTS 18 15 0
159216870 abhidot A June 2, 2022, 5:51 a.m. OK GNU C++20 (64) TESTS 18 15 0
159188618 haque_3 A June 1, 2022, 5:59 p.m. OK GNU C++20 (64) TESTS 18 15 0
159150952 lock_infinity A June 1, 2022, 10:40 a.m. OK Java 11 TESTS 18 171 0
159217556 gurkaran_s A June 2, 2022, 6:01 a.m. OK Java 11 TESTS 18 186 0
159202147 Plums A June 1, 2022, 10:37 p.m. OK Java 11 TESTS 18 187 0
159200281 FernandezRoberto A June 1, 2022, 9:37 p.m. OK Java 11 TESTS 18 187 0
159196740 pranp_24 A June 1, 2022, 8:09 p.m. OK Java 11 TESTS 18 187 0
159158036 helmut_schmacker A June 1, 2022, 12:03 p.m. OK Java 11 TESTS 18 187 0
159150984 humblefool6996 A June 1, 2022, 10:40 a.m. OK Java 11 TESTS 18 187 0
159216358 Ronin121 A June 2, 2022, 5:43 a.m. OK Java 11 TESTS 18 202 0
159123883 camt_bot A June 1, 2022, 5:24 a.m. OK Java 11 TESTS 18 202 0
159208127 Alimineti_Karthikeya A June 2, 2022, 2:38 a.m. OK Java 11 TESTS 18 202 2355200
159141779 UniversalAdmin A June 1, 2022, 9 a.m. OK Java 8 TESTS 18 109 0
159127507 aviJ A June 1, 2022, 6:12 a.m. OK Java 8 TESTS 18 109 1843200
159158205 Ah86543 A June 1, 2022, 12:05 p.m. OK Java 8 TESTS 18 124 1843200
159155860 yahiamoussadek1 A June 1, 2022, 11:37 a.m. OK Java 8 TESTS 18 124 1843200
159136013 vrishabshetty A June 1, 2022, 7:54 a.m. OK Java 8 TESTS 18 124 1843200
159134877 ak_ankit A June 1, 2022, 7:40 a.m. OK Java 8 TESTS 18 124 1843200
159127934 rcritick25 A June 1, 2022, 6:17 a.m. OK Java 8 TESTS 18 233 0
159148735 sunscreen A June 1, 2022, 10:16 a.m. OK Java 8 TESTS 18 234 0
159138228 varliu A June 1, 2022, 8:21 a.m. OK Java 8 TESTS 18 234 0
159137834 Heavenrj A June 1, 2022, 8:16 a.m. OK Java 8 TESTS 18 234 0
159180117 raghultamil A June 1, 2022, 4:16 p.m. OK Kotlin 1.5 TESTS 18 249 3788800
159209394 ripity A June 2, 2022, 3:14 a.m. OK Kotlin 1.6 TESTS 18 202 0
159156255 IrishWhizzkid A June 1, 2022, 11:41 a.m. OK MS C++ 2017 TESTS 18 93 0
159170249 EbisuSA A June 1, 2022, 2:21 p.m. OK MS C++ 2017 TESTS 18 93 409600
159125437 Nosov_Vovanus2022 A June 1, 2022, 5:46 a.m. OK MS C++ 2017 TESTS 18 108 409600
159166333 wundersmith A June 1, 2022, 1:37 p.m. OK MS C++ 2017 TESTS 18 109 0
159192653 Morrowinds_Revenge A June 1, 2022, 6:54 p.m. OK MS C++ 2017 TESTS 18 109 409600
159186560 Hachapuri A June 1, 2022, 5:33 p.m. OK MS C++ 2017 TESTS 18 109 3993600
159133933 rounak_58 A June 1, 2022, 7:28 a.m. OK MS C++ 2017 TESTS 18 124 1024000
159147164 nktanh A June 1, 2022, 9:59 a.m. OK Node.js TESTS 18 109 13209600
159167589 toxahak A June 1, 2022, 1:51 p.m. OK Node.js TESTS 18 140 13209600
159123663 tryingit A June 1, 2022, 5:21 a.m. OK Node.js TESTS 18 140 14233600
159189289 Abdusharif A June 1, 2022, 6:08 p.m. OK PyPy 3 TESTS 18 155 11980800
159151603 hiardik45_exe A June 1, 2022, 10:47 a.m. OK PyPy 3 TESTS 18 155 12083200
159173273 Deltasirius A June 1, 2022, 2:55 p.m. OK PyPy 3 TESTS 18 171 10854400
159168764 rainap A June 1, 2022, 2:04 p.m. OK PyPy 3 TESTS 18 171 10956800
159151954 beksultanomirzak.2001 A June 1, 2022, 10:51 a.m. OK PyPy 3 TESTS 18 171 11776000
159123651 CarbonBlack A June 1, 2022, 5:20 a.m. OK PyPy 3 TESTS 18 186 11980800
159167793 rad8928 A June 1, 2022, 1:53 p.m. OK PyPy 3 TESTS 18 187 12083200
159177150 Moin A June 1, 2022, 3:43 p.m. OK PyPy 3 TESTS 18 202 11776000
159122544 Kishen19 A June 1, 2022, 5:05 a.m. OK PyPy 3 TESTS 18 202 12800000
159200893 jerwu A June 1, 2022, 9:55 p.m. OK PyPy 3-64 TESTS 18 62 14643200
159152529 tushar26427 A June 1, 2022, 10:58 a.m. OK PyPy 3-64 TESTS 18 77 14848000
159199229 RANK1ZEN A June 1, 2022, 9:09 p.m. OK PyPy 3-64 TESTS 18 78 17100800
159217249 Soumik43 A June 2, 2022, 5:57 a.m. OK PyPy 3-64 TESTS 18 93 17305600
159186639 immafuck A June 1, 2022, 5:34 p.m. OK PyPy 3-64 TESTS 18 140 11264000
159217308 Akku_chmwl A June 2, 2022, 5:58 a.m. OK PyPy 3-64 TESTS 18 140 11980800
159155049 Nizomidin A June 1, 2022, 11:27 a.m. OK PyPy 3-64 TESTS 18 140 16691200
159173406 Nan-Do A June 1, 2022, 2:57 p.m. OK PyPy 3-64 TESTS 18 140 18022400
159130288 anishsan A June 1, 2022, 6:44 a.m. OK PyPy 3-64 TESTS 18 140 18022400
159138624 Varad2002 A June 1, 2022, 8:25 a.m. OK PyPy 3-64 TESTS 18 155 13004800
159194314 Colder A June 1, 2022, 7:22 p.m. OK Python 3 TESTS 18 77 7065600
159178842 praveencoder A June 1, 2022, 4:02 p.m. OK Python 3 TESTS 18 77 8806400
159123593 Sai1766 A June 1, 2022, 5:20 a.m. OK Python 3 TESTS 18 77 8806400
159182227 Ahmed_Abdelrazik A June 1, 2022, 4:40 p.m. OK Python 3 TESTS 18 78 7065600
159187800 Ele_1 A June 1, 2022, 5:49 p.m. OK Python 3 TESTS 18 78 8806400
159180427 mn-9 A June 1, 2022, 4:20 p.m. OK Python 3 TESTS 18 78 8806400
159179455 devsharma03 A June 1, 2022, 4:09 p.m. OK Python 3 TESTS 18 78 8806400
159178544 kondekarshubham123 A June 1, 2022, 3:59 p.m. OK Python 3 TESTS 18 78 8806400
159165314 Sahil093 A June 1, 2022, 1:26 p.m. OK Python 3 TESTS 18 78 8806400
159153047 Muhammad.Daniyal A June 1, 2022, 11:03 a.m. OK Python 3 TESTS 18 78 8806400

remove filters

Back to search problems