Codeforces Round 575 (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
1196 Codeforces Round 575 (Div. 3) FINISHED False 7200 167844299 July 24, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16688 ) B Odd Sum Segments PROGRAMMING constructive algorithms math 1200

B'You are given an array a consisting of n integers a_1, a_2, ... , a_n . You want to split it into exactly k non-empty non-intersecting subsegments such that each subsegment has odd sum (i. xe2 x80 x89e. for each subsegment, the sum of all elements that belong to this subsegment is odd). It is impossible to rearrange (shuffle) the elements of a given array. Each of the n elements of the array a must belong to exactly one of the k subsegments. Let 's see some examples of dividing the array of length 5 into 3 subsegments (not necessarily with odd sums): [1, 2, 3, 4, 5] is the initial array, then all possible ways to divide it into 3 non-empty non-intersecting subsegments are described below: Of course, it can be impossible to divide the initial array into exactly k subsegments in such a way that each of them will have odd sum of elements. In this case print "NO". Otherwise, print "YES" and any possible division of the array. See the output format for the detailed explanation. You have to answer q independent queries. The first line contains one integer q ( 1 <= q <= 2 cdot 10^5 ) -- the number of queries. Then q queries follow. The first line of the query contains two integers n and k ( 1 <= k <= n <= 2 cdot 10^5 ) -- the number of elements in the array and the number of subsegments, respectively. The second line of the query contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ), where a_i is the i -th element of a . It is guaranteed that the sum of n over all queries does not exceed 2 cdot 10^5 ( sum n <= 2 cdot 10^5 ). For each query, print the answer to it. If it is impossible to divide the initial array into exactly k subsegments in such a way that each of them will have odd sum of elements, print "NO" in the first line. Otherwise, print "YES" in the first line and any possible div'...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
57913344 szfck B July 28, 2019, 10:20 p.m. OK Clang++17 Diagnostics TESTS 16 545 15769600 1200
58501941 zzzzzzxxx B Aug. 9, 2019, 2:41 p.m. OK Clang++17 Diagnostics TESTS 16 577 16793600 1200
58866215 Qusai_Hroub B Aug. 15, 2019, 1:28 p.m. OK D TESTS 16 233 307200 1200
57782147 hatsuyuki15 B July 26, 2019, 6:23 a.m. OK D TESTS 16 280 0 1200
57864679 kennyge B July 27, 2019, 8:07 p.m. OK D TESTS 16 280 1331200 1200
60399592 Denor B Sept. 11, 2019, 4:11 p.m. OK Delphi TESTS 16 156 819200 1200
57976117 Craspedacusta B July 30, 2019, 7:45 a.m. OK FPC TESTS 16 1216 819200 1200
57947195 ATSTNG B July 29, 2019, 2:49 p.m. OK FPC TESTS 16 1248 819200 1200
57751103 rosekiller1211 B July 25, 2019, 2:49 p.m. OK FPC TESTS 16 1263 819200 1200
68710370 canhtoantpvp B Jan. 13, 2020, 12:47 p.m. OK FPC TESTS 16 1263 921600 1200
58412015 TokarinRika B Aug. 7, 2019, 2:16 a.m. OK FPC TESTS 16 1778 819200 1200
59568681 lcr2580 shenlihong wh0816 B Aug. 27, 2019, 11:44 a.m. OK GNU C11 TESTS 16 717 819200 1200
60722110 AurumnPegasus B Sept. 17, 2019, 12:43 p.m. OK GNU C11 TESTS 16 733 2355200 1200
58183154 _nmp_ B Aug. 2, 2019, 4:02 p.m. OK GNU C11 TESTS 16 1279 819200 1200
57990868 anantahemalatha B July 30, 2019, 1:11 p.m. OK GNU C11 TESTS 16 1279 819200 1200
57969459 Hridoy23 B July 30, 2019, 5:06 a.m. OK GNU C11 TESTS 16 1294 819200 1200
59191954 heydx B Aug. 20, 2019, 9:54 p.m. OK GNU C11 TESTS 16 1294 819200 1200
58258468 DSP-friendly B Aug. 4, 2019, 11:11 a.m. OK GNU C11 TESTS 16 1294 819200 1200
60066532 rishiraje B Sept. 5, 2019, 9:19 a.m. OK GNU C11 TESTS 16 1294 819200 1200
59961710 XAMRMAX B Sept. 3, 2019, 6:20 p.m. OK GNU C11 TESTS 16 1294 819200 1200
59243289 Poppolino B Aug. 21, 2019, 9:05 p.m. OK GNU C11 TESTS 16 1294 819200 1200
62110081 luogu_bot2 B Oct. 8, 2019, 11:58 a.m. OK GNU C++11 TESTS 16 46 1433600 1200
57742790 Heartlessly B July 25, 2019, 11:59 a.m. OK GNU C++11 TESTS 16 46 1536000 1200
58240392 ILoLy B Aug. 4, 2019, 12:04 a.m. OK GNU C++11 TESTS 16 46 7884800 1200
57741791 Zechariah_2001 B July 25, 2019, 11:40 a.m. OK GNU C++11 TESTS 16 46 20070400 1200
58251911 AndyMo B Aug. 4, 2019, 8:15 a.m. OK GNU C++11 TESTS 16 61 614400 1200
57782791 LJC00118 B July 26, 2019, 6:38 a.m. OK GNU C++11 TESTS 16 61 819200 1200
57772295 luogu_bot2 B July 26, 2019, 1:34 a.m. OK GNU C++11 TESTS 16 61 1638400 1200
57747467 -Javelin- B July 25, 2019, 1:34 p.m. OK GNU C++11 TESTS 16 61 3276800 1200
57806318 AndyMo B July 26, 2019, 3:18 p.m. OK GNU C++11 TESTS 16 62 614400 1200
58248873 Secret_exciting B Aug. 4, 2019, 6:52 a.m. OK GNU C++11 TESTS 16 62 819200 1200
59679584 Linkus B Aug. 29, 2019, 7:50 p.m. OK GNU C++14 TESTS 16 62 819200 1200
58919692 tokitsukaze B Aug. 16, 2019, 4:31 p.m. OK GNU C++14 TESTS 16 93 2764800 1200
61282062 pc_champ B Sept. 25, 2019, 5:13 p.m. OK GNU C++14 TESTS 16 124 819200 1200
58293577 ghanta88 B Aug. 4, 2019, 5:45 p.m. OK GNU C++14 TESTS 16 124 819200 1200
57820855 fefeng B July 26, 2019, 11:04 p.m. OK GNU C++14 TESTS 16 124 819200 1200
58213517 luciferkingofthehell B Aug. 3, 2019, 9:44 a.m. OK GNU C++14 TESTS 16 124 819200 1200
57796669 Acker_man B July 26, 2019, 11:40 a.m. OK GNU C++14 TESTS 16 124 819200 1200
58325572 vjudge3 B Aug. 5, 2019, 7:37 a.m. OK GNU C++14 TESTS 16 124 921600 1200
69219573 vjudge4 B Jan. 21, 2020, 3:39 a.m. OK GNU C++14 TESTS 16 124 1638400 1200
58151008 vjudge4 B Aug. 2, 2019, 2:34 a.m. OK GNU C++14 TESTS 16 124 2355200 1200
59081349 lesskreker B Aug. 19, 2019, 9:17 a.m. OK GNU C++17 TESTS 16 62 819200 1200
57790218 wentwrong B July 26, 2019, 9:11 a.m. OK GNU C++17 TESTS 16 124 819200 1200
57731024 tulasi234 B July 25, 2019, 8:35 a.m. OK GNU C++17 TESTS 16 124 819200 1200
57733608 pujitha065 B July 25, 2019, 9:16 a.m. OK GNU C++17 TESTS 16 139 819200 1200
57733837 pavyasree B July 25, 2019, 9:20 a.m. OK GNU C++17 TESTS 16 139 819200 1200
59970106 gtostes B Sept. 4, 2019, 12:10 a.m. OK GNU C++17 TESTS 16 139 819200 1200
66591091 lijiatu B Dec. 10, 2019, 1:01 p.m. OK GNU C++17 TESTS 16 139 819200 1200
57915309 mohamedeltair B July 29, 2019, 12:44 a.m. OK GNU C++17 TESTS 16 139 1638400 1200
66415664 From_Earth_to_Mars B Dec. 6, 2019, 4:59 p.m. OK GNU C++17 TESTS 16 139 2457600 1200
68770450 vjudge3 B Jan. 14, 2020, 11:39 a.m. OK GNU C++17 TESTS 16 140 819200 1200
59680355 reanimatorzon B Aug. 29, 2019, 8:13 p.m. OK Go TESTS 16 77 4608000 1200
57791674 serhiimazurok B July 26, 2019, 9:41 a.m. OK Go TESTS 16 421 5324800 1200
62655280 sighduck B Oct. 16, 2019, 12:56 a.m. OK Go TESTS 16 436 5324800 1200
59579216 suryanshv23 B Aug. 27, 2019, 3:19 p.m. OK Go TESTS 16 1668 5427200 1200
58207690 suryanshv23 B Aug. 3, 2019, 7:41 a.m. OK Go TESTS 16 1684 5427200 1200
57806655 Black_Fregat B July 26, 2019, 3:26 p.m. OK Haskell TESTS 16 997 17817600 1200
57936389 jmazon B July 29, 2019, 10:56 a.m. OK Haskell TESTS 16 1029 48332800 1200
69256631 CodAR B Jan. 21, 2020, 3:50 p.m. OK Java 11 TESTS 16 514 19865600 1200
58130518 mansor B Aug. 1, 2019, 2:06 p.m. OK Java 8 TESTS 16 155 0 1200
59540395 icpc_loser B Aug. 26, 2019, 6:39 p.m. OK Java 8 TESTS 16 155 8396800 1200
57791207 In_The_Name_Of_Love B July 26, 2019, 9:31 a.m. OK Java 8 TESTS 16 170 0 1200
67563624 MahmoudJobeel B Dec. 24, 2019, 6:24 p.m. OK Java 8 TESTS 16 171 0 1200
58077868 spar5h B July 31, 2019, 12:58 p.m. OK Java 8 TESTS 16 171 0 1200
57920432 Termii B July 29, 2019, 4:29 a.m. OK Java 8 TESTS 16 171 0 1200
58708316 rahsutamrev B Aug. 13, 2019, 11:16 a.m. OK Java 8 TESTS 16 171 5529600 1200
61228702 housni B Sept. 24, 2019, 3:58 p.m. OK Java 8 TESTS 16 186 0 1200
63777690 Apurva021 B Oct. 30, 2019, 10:05 a.m. OK Java 8 TESTS 16 186 5836800 1200
63434344 dhaNiN B Oct. 26, 2019, 10:08 a.m. OK Java 8 TESTS 16 187 0 1200
57881924 kuzAnatoliy B July 28, 2019, 8:11 a.m. OK JavaScript TESTS 16 1934 47308800 1200
58677594 Lishy2010 B Aug. 12, 2019, 5:16 p.m. OK Kotlin TESTS 16 342 17715200 1200
60194258 Benq B Sept. 7, 2019, 12:10 a.m. OK Kotlin TESTS 16 498 17305600 1200
58975847 david_varela B Aug. 18, 2019, 12:39 a.m. OK Kotlin TESTS 16 499 18432000 1200
57751142 CauchyRiemann B July 25, 2019, 2:49 p.m. OK Kotlin TESTS 16 514 17612800 1200
58975872 david_varela B Aug. 18, 2019, 12:42 a.m. OK Kotlin TESTS 16 529 19456000 1200
57744461 KanhuKeNanu B July 25, 2019, 12:32 p.m. OK Kotlin TESTS 16 530 20070400 1200
57738972 bohuss B July 25, 2019, 10:51 a.m. OK Kotlin TESTS 16 748 6041600 1200
57731705 sashamc B July 25, 2019, 8:46 a.m. OK Kotlin TESTS 16 2012 18227200 1200
57748548 CauchyRiemann B July 25, 2019, 1:55 p.m. OK Kotlin TESTS 16 2995 17408000 1200
58975801 david_varela B Aug. 18, 2019, 12:36 a.m. OK Kotlin TESTS 16 2995 18432000 1200
58018208 og.kostya B July 30, 2019, 3:43 p.m. OK Mono C# TESTS 16 124 5734400 1200
57924376 treasuryonly B July 29, 2019, 6:32 a.m. OK Mono C# TESTS 16 311 32563200 1200
57846223 FrankF B July 27, 2019, 11:17 a.m. OK Mono C# TESTS 16 1450 30924800 1200
58215788 Salatik231166 B Aug. 3, 2019, 10:41 a.m. OK Mono C# TESTS 16 1528 34918400 1200
57850576 amit1509kumar B July 27, 2019, 12:58 p.m. OK Mono C# TESTS 16 1965 26726400 1200
57908923 Ruban_Denic B July 28, 2019, 6:57 p.m. OK Mono C# TESTS 16 1980 31129600 1200
59867623 div3player B Sept. 1, 2019, 5:51 p.m. OK Mono C# TESTS 16 2042 27443200 1200
57747687 TRR B July 25, 2019, 1:39 p.m. OK Mono C# TESTS 16 2121 27545600 1200
66394935 ansergeyg B Dec. 6, 2019, 10:26 a.m. OK Mono C# TESTS 16 2152 28672000 1200
57788586 NEvOl B July 26, 2019, 8:40 a.m. OK Mono C# TESTS 16 2152 32153600 1200
58114711 vjudge5 B Aug. 1, 2019, 8:29 a.m. OK MS C++ TESTS 16 124 819200 1200
57824440 vjudge4 B July 27, 2019, 2:06 a.m. OK MS C++ TESTS 16 124 819200 1200
58101486 vjudge5 B Aug. 1, 2019, 1:16 a.m. OK MS C++ TESTS 16 124 1638400 1200
58322679 vjudge5 B Aug. 5, 2019, 6:32 a.m. OK MS C++ TESTS 16 124 2457600 1200
61846093 vjudge4 B Oct. 4, 2019, 11:22 a.m. OK MS C++ TESTS 16 124 16076800 1200
61846056 vjudge1 B Oct. 4, 2019, 11:21 a.m. OK MS C++ TESTS 16 124 16076800 1200
57776871 vjudge2 B July 26, 2019, 4:04 a.m. OK MS C++ TESTS 16 139 1433600 1200
68819054 vjudge2 B Jan. 14, 2020, 4:55 p.m. OK MS C++ TESTS 16 139 1638400 1200
63131260 vjudge1 B Oct. 22, 2019, 2:17 p.m. OK MS C++ TESTS 16 140 819200 1200
61552860 vjudge4 B Sept. 30, 2019, 1:04 p.m. OK MS C++ TESTS 16 140 819200 1200
58065187 vjudge2 B July 31, 2019, 8:42 a.m. OK MS C++ 2017 TESTS 16 202 1638400 1200
58059059 Saber_Altria B July 31, 2019, 6:40 a.m. OK MS C++ 2017 TESTS 16 202 1638400 1200
57811421 xsc B July 26, 2019, 5:31 p.m. OK MS C++ 2017 TESTS 16 217 1638400 1200
57783940 vjudge5 B July 26, 2019, 7:02 a.m. OK MS C++ 2017 TESTS 16 218 1638400 1200
60288097 durano B Sept. 9, 2019, 4:45 a.m. OK MS C++ 2017 TESTS 16 218 2560000 1200
58058882 yyoooo B July 31, 2019, 6:36 a.m. OK MS C++ 2017 TESTS 16 218 3174400 1200
57788355 vjudge4 B July 26, 2019, 8:36 a.m. OK MS C++ 2017 TESTS 16 218 11980800 1200
58344806 SeongYunKim B Aug. 5, 2019, 2:32 p.m. OK MS C++ 2017 TESTS 16 233 819200 1200
57833641 quyunhao B July 27, 2019, 6:51 a.m. OK MS C++ 2017 TESTS 16 233 2457600 1200
57823305 F91WoDaGe B July 27, 2019, 1:19 a.m. OK MS C++ 2017 TESTS 16 233 7987200 1200
57730149 badawhite B July 25, 2019, 8:22 a.m. OK Node.js TESTS 16 498 46080000 1200
57761796 mayakin B July 25, 2019, 6:18 p.m. OK PHP TESTS 16 2308 18432000 1200
57836250 snape_here B July 27, 2019, 7:40 a.m. OK PyPy 2 TESTS 16 342 19148800 1200
57894587 yumtam B July 28, 2019, 1:03 p.m. OK PyPy 2 TESTS 16 342 23654400 1200
57749025 snape_here B July 25, 2019, 2:05 p.m. OK PyPy 2 TESTS 16 374 18944000 1200
57754469 TLE_WA B July 25, 2019, 3:49 p.m. OK PyPy 2 TESTS 16 920 12595200 1200
57732624 bertrandovide B July 25, 2019, 9 a.m. OK PyPy 2 TESTS 16 2807 13107200 1200
57733668 SpikeSpeigel B July 25, 2019, 9:18 a.m. OK PyPy 3 TESTS 16 545 23040000 1200
57737704 Mr_No_One B July 25, 2019, 10:27 a.m. OK PyPy 3 TESTS 16 576 23040000 1200
57800108 Pokeylope B July 26, 2019, 12:57 p.m. OK PyPy 3 TESTS 16 670 18534400 1200
60718014 Sorting B Sept. 17, 2019, 11:26 a.m. OK PyPy 3 TESTS 16 670 21504000 1200
57739871 Mr_No_One B July 25, 2019, 11:08 a.m. OK PyPy 3 TESTS 16 685 18124800 1200
57941912 shiv1470 B July 29, 2019, 12:52 p.m. OK PyPy 3 TESTS 16 685 18636800 1200
58402846 Jon B Aug. 6, 2019, 6:42 p.m. OK PyPy 3 TESTS 16 685 18739200 1200
57740391 Mr_No_One B July 25, 2019, 11:17 a.m. OK PyPy 3 TESTS 16 686 18944000 1200
57740185 Mr_No_One B July 25, 2019, 11:13 a.m. OK PyPy 3 TESTS 16 686 19456000 1200
58084390 LordVader B July 31, 2019, 3 p.m. OK PyPy 3 TESTS 16 686 21299200 1200
59765619 angoncal B Aug. 30, 2019, 6 p.m. OK Python 2 TESTS 16 982 11161600 1200
59765224 bilau_de_campina B Aug. 30, 2019, 5:53 p.m. OK Python 2 TESTS 16 982 11161600 1200
59765110 bilau_de_campina B Aug. 30, 2019, 5:51 p.m. OK Python 2 TESTS 16 1044 11161600 1200
57903118 Helli.code B July 28, 2019, 4:30 p.m. OK Python 2 TESTS 16 1045 11161600 1200
57732719 bertrandovide B July 25, 2019, 9:02 a.m. OK Python 2 TESTS 16 1123 11059200 1200
57754564 elistark B July 25, 2019, 3:51 p.m. OK Python 2 TESTS 16 1169 11059200 1200
59383028 GayathriVenkatesh B Aug. 24, 2019, 4:42 a.m. OK Python 2 TESTS 16 1310 11059200 1200
57747988 snape_here B July 25, 2019, 1:44 p.m. OK Python 2 TESTS 16 1372 11059200 1200
66190053 ttchengab B Dec. 2, 2019, 4:03 p.m. OK Python 2 TESTS 16 1372 12800000 1200
67749335 KA_Rma B Dec. 27, 2019, 5:21 p.m. OK Python 3 TESTS 16 1091 23347200 1200
59107372 stupid_username B Aug. 19, 2019, 6:38 p.m. OK Python 3 TESTS 16 1216 18944000 1200
57740160 Mr_No_One B July 25, 2019, 11:13 a.m. OK Python 3 TESTS 16 1388 16179200 1200
57738385 SamuelLH B July 25, 2019, 10:40 a.m. OK Python 3 TESTS 16 1403 16486400 1200
57817276 KAin0 B July 26, 2019, 8:26 p.m. OK Python 3 TESTS 16 1403 17612800 1200
57726463 IceFire B July 25, 2019, 7:19 a.m. OK Python 3 TESTS 16 1404 20684800 1200
57739943 Mr_No_One B July 25, 2019, 11:09 a.m. OK Python 3 TESTS 16 1450 16486400 1200
62619155 gswetha1713 B Oct. 15, 2019, 12:20 p.m. OK Python 3 TESTS 16 1466 16998400 1200
58251731 maslov.alex1580 B Aug. 4, 2019, 8:10 a.m. OK Python 3 TESTS 16 1481 16076800 1200
68133976 Gaurav1 B Jan. 3, 2020, 6:03 p.m. OK Python 3 TESTS 16 1482 16384000 1200
59139820 Andrey_R B Aug. 20, 2019, 1:59 p.m. OK Ruby TESTS 16 1091 36147200 1200
60929593 nemi_zzz B Sept. 20, 2019, 1:20 p.m. OK Ruby TESTS 16 1123 39526400 1200
57879171 greed2411 B July 28, 2019, 6:57 a.m. OK Rust TESTS 16 108 7577600 1200
57777522 andreyrmg B July 26, 2019, 4:23 a.m. OK Rust TESTS 16 124 7577600 1200
58033635 greed2411 B July 30, 2019, 5:02 p.m. OK Rust TESTS 16 155 7577600 1200
58072848 greed2411 B July 31, 2019, 11:20 a.m. OK Rust TESTS 16 156 7577600 1200
58179583 rasphino B Aug. 2, 2019, 2:36 p.m. OK Rust TESTS 16 171 11980800 1200
57905235 macho_uno B July 28, 2019, 5:20 p.m. OK Rust TESTS 16 171 18944000 1200
58179996 rasphino B Aug. 2, 2019, 2:47 p.m. OK Rust TESTS 16 186 11980800 1200
58072763 greed2411 B July 31, 2019, 11:18 a.m. OK Rust TESTS 16 187 7577600 1200

remove filters

Back to search problems