Codeforces Round 251 (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
439 Codeforces Round 251 (Div. 2) FINISHED False 7200 335716204 June 4, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3984 ) C Devu and Partitioning of the Array PROGRAMMING brute force constructive algorithms implementation number theory 1700

B'Devu being a small kid, likes to play a lot, but he only likes to play with arrays. While playing he came up with an interesting question which he could not solve, can you please solve it for him? Given an array consisting of distinct integers. Is it possible to partition the whole array into k disjoint non-empty parts such that p of the parts have even sum (each of them must have even sum) and remaining k - p have odd sum? (note that parts need not to be continuous). If it is possible to partition the array, also give any possible way of valid partitioning. The first line will contain three space separated integers n, k, p (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105; 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89p xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k). The next line will contain n space-separated distinct integers representing the content of array a: a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). In the first line print "YES" (without the quotes) if it is possible to partition the array in the required way. Otherwise print "NO" (without the quotes). If the required partition exists, print k lines after the first line. The ith of them should contain the content of the ith part. Print the content of the part in the line in the following way: firstly print the number of elements of the part, then print all the elements of the part in arbitrary order. There must be exactly p parts with even sum, each of the remaining k - p parts must have odd sum. As there can be multiple partitions, you are allowed to print any valid partition.'...

Tutorials

Codeforces Round #251 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
10636845 cpy C April 9, 2015, 6:03 a.m. OK D TESTS 75 156 6451200 1700
19568095 vkozlovs C Aug. 1, 2016, 8:39 p.m. OK FPC TESTS 75 187 1740800 1700
18004770 Gray_58 C May 20, 2016, 12:40 p.m. OK FPC TESTS 75 187 6553600 1700
23280785 Jicote C Dec. 24, 2016, 11:48 p.m. OK FPC TESTS 75 202 3276800 1700
32484024 TShT C Nov. 19, 2017, 8:58 p.m. OK FPC TESTS 75 202 9625600 1700
29489021 T.S.H.T C Aug. 15, 2017, 7:11 p.m. OK FPC TESTS 75 233 9625600 1700
18970227 MR.GIOmetric C July 8, 2016, 1:13 p.m. OK FPC TESTS 75 248 819200 1700
53815041 chaorenhaha C May 6, 2019, 9:44 a.m. OK FPC TESTS 75 842 7270400 1700
21872812 Nightwolf4011 C Oct. 29, 2016, 1:32 p.m. OK GNU C TESTS 75 61 819200 1700
23587245 rkb123 C Jan. 6, 2017, 2:27 p.m. OK GNU C TESTS 75 61 2662400 1700
21862467 nakedghost C Oct. 29, 2016, 3:19 a.m. OK GNU C TESTS 75 62 409600 1700
21856757 kukiamarilla C Oct. 28, 2016, 7:13 p.m. OK GNU C TESTS 75 62 409600 1700
21852387 joss3 C Oct. 28, 2016, 4:26 p.m. OK GNU C TESTS 75 62 409600 1700
21692304 AmantedelaComida C Oct. 22, 2016, 7:23 p.m. OK GNU C TESTS 75 62 409600 1700
21884489 maney C Oct. 30, 2016, 12:13 a.m. OK GNU C TESTS 75 62 819200 1700
21884202 SebastianMoreno C Oct. 29, 2016, 11:21 p.m. OK GNU C TESTS 75 62 819200 1700
21884003 Miguel_dP C Oct. 29, 2016, 10:51 p.m. OK GNU C TESTS 75 62 819200 1700
21880515 BelenSaldivar98 C Oct. 29, 2016, 7:02 p.m. OK GNU C TESTS 75 62 819200 1700
17882485 Fire_man C May 13, 2016, 12:13 a.m. OK GNU C++ TESTS 75 46 3072000 1700
40988361 ReaLNero1 C July 30, 2018, 9:55 p.m. OK GNU C++ TESTS 75 46 3481600 1700
11620450 punjabidon C June 17, 2015, 1:53 p.m. OK GNU C++ TESTS 75 61 614400 1700
14810609 nlgxh7 C Dec. 15, 2015, 4:28 a.m. OK GNU C++ TESTS 75 61 819200 1700
14816472 nlgxh2 C Dec. 15, 2015, 2:30 p.m. OK GNU C++ TESTS 75 61 819200 1700
10237590 vjudge4 C March 11, 2015, 1:42 p.m. OK GNU C++ TESTS 75 61 819200 1700
13418668 alex20030190 C Oct. 5, 2015, 3:31 p.m. OK GNU C++ TESTS 75 61 1024000 1700
13504981 nevergiveup C Oct. 9, 2015, 7:31 a.m. OK GNU C++ TESTS 75 61 1228800 1700
9623629 Zinia C Jan. 30, 2015, 8:12 a.m. OK GNU C++ TESTS 75 61 1228800 1700
10311444 Hellyscythe C March 17, 2015, 2:37 p.m. OK GNU C++ TESTS 75 61 1433600 1700
10057632 Kole C Feb. 27, 2015, 10:44 p.m. OK GNU C++0x TESTS 75 62 409600 1700
9567832 Jin_Haonan C Jan. 27, 2015, 3:28 a.m. OK GNU C++0x TESTS 75 62 614400 1700
9567273 Dirak C Jan. 27, 2015, 1:54 a.m. OK GNU C++0x TESTS 75 77 614400 1700
9544711 a1s3a C Jan. 25, 2015, 3:35 a.m. OK GNU C++0x TESTS 75 108 3379200 1700
10257646 sonlh07 C March 13, 2015, 12:46 p.m. OK GNU C++0x TESTS 75 155 3174400 1700
9815450 ho-jo-bo-ro-lo C Feb. 13, 2015, 11:36 a.m. OK GNU C++0x TESTS 75 171 9318400 1700
9815468 ho-jo-bo-ro-lo C Feb. 13, 2015, 11:38 a.m. OK GNU C++0x TESTS 75 186 9216000 1700
9815420 ho-jo-bo-ro-lo C Feb. 13, 2015, 11:32 a.m. OK GNU C++0x TESTS 75 186 10342400 1700
10101343 KhaledMuhammad C March 1, 2015, 9:04 p.m. OK GNU C++0x TESTS 75 264 3788800 1700
9559105 Surenbayar C Jan. 26, 2015, 11:09 a.m. OK GNU C++0x TESTS 75 265 2969600 1700
57957297 rainboy C July 29, 2019, 7:26 p.m. OK GNU C11 TESTS 75 374 819200 1700
21809158 majogrance C Oct. 26, 2016, 10:48 p.m. OK GNU C11 TESTS 75 421 819200 1700
21809180 majogrance C Oct. 26, 2016, 10:50 p.m. OK GNU C11 TESTS 75 436 819200 1700
22122815 majogrance C Nov. 9, 2016, 2:46 a.m. OK GNU C11 TESTS 75 436 819200 1700
21832183 majogrance C Oct. 27, 2016, 6:43 p.m. OK GNU C11 TESTS 75 452 819200 1700
22121696 majogrance C Nov. 8, 2016, 11:19 p.m. OK GNU C11 TESTS 75 467 819200 1700
21809134 majogrance C Oct. 26, 2016, 10:45 p.m. OK GNU C11 TESTS 75 467 819200 1700
22121677 majogrance C Nov. 8, 2016, 11:16 p.m. OK GNU C11 TESTS 75 468 819200 1700
22122715 majogrance C Nov. 9, 2016, 2:29 a.m. OK GNU C11 TESTS 75 468 819200 1700
21808973 majogrance C Oct. 26, 2016, 10:28 p.m. OK GNU C11 TESTS 75 468 819200 1700
57627810 luogu_bot1 C July 24, 2019, 7:41 a.m. OK GNU C++11 TESTS 75 46 1228800 1700
57627696 RandoMNamE0 C July 24, 2019, 7:38 a.m. OK GNU C++11 TESTS 75 46 1228800 1700
19274180 haleyk100198 C July 20, 2016, 8 a.m. OK GNU C++11 TESTS 75 46 1536000 1700
43740950 dhruv1998 C Oct. 3, 2018, 5:54 p.m. OK GNU C++11 TESTS 75 46 4403200 1700
22667614 ExiLe_ReDempTion C Dec. 3, 2016, 12:47 a.m. OK GNU C++11 TESTS 75 61 819200 1700
40778839 vjudge2 C July 26, 2018, 12:41 p.m. OK GNU C++11 TESTS 75 61 819200 1700
10831482 dashuiren C April 23, 2015, 7:05 a.m. OK GNU C++11 TESTS 75 61 5120000 1700
69845139 luogu_bot2 C Jan. 30, 2020, 2:09 p.m. OK GNU C++11 TESTS 75 62 409600 1700
19424155 S031402119 C July 26, 2016, 2:04 p.m. OK GNU C++11 TESTS 75 62 614400 1700
13112127 VAVAvile C Sept. 20, 2015, 9:28 a.m. OK GNU C++11 TESTS 75 62 614400 1700
22678343 0ogway C Dec. 3, 2016, 1:48 p.m. OK GNU C++14 TESTS 75 61 3481600 1700
58544319 lakshay_nasa C Aug. 10, 2019, 3:47 p.m. OK GNU C++14 TESTS 75 62 409600 1700
38703877 Wolve_rine C May 28, 2018, 8:21 p.m. OK GNU C++14 TESTS 75 62 614400 1700
49979414 KirinSB C Feb. 16, 2019, 7:34 a.m. OK GNU C++14 TESTS 75 62 819200 1700
32581242 dionysios C Nov. 23, 2017, 3:16 p.m. OK GNU C++14 TESTS 75 62 1024000 1700
64517122 krpiyush5 C Nov. 8, 2019, 11:08 a.m. OK GNU C++14 TESTS 75 62 1024000 1700
55556368 Sad_reacts_only C June 14, 2019, 10:07 a.m. OK GNU C++14 TESTS 75 62 1024000 1700
31920200 rohitthapliyal C Oct. 31, 2017, 12:02 p.m. OK GNU C++14 TESTS 75 62 1126400 1700
41985083 rajg C Aug. 23, 2018, 5:30 a.m. OK GNU C++14 TESTS 75 62 1126400 1700
53960075 arbitrary_A C May 10, 2019, 1:41 p.m. OK GNU C++14 TESTS 75 62 1126400 1700
56558697 gyuni C July 5, 2019, 1:42 p.m. OK GNU C++17 TESTS 75 62 409600 1700
69831132 vjudge4 C Jan. 30, 2020, 10:30 a.m. OK GNU C++17 TESTS 75 62 819200 1700
49653634 xyw5vplus1 C Feb. 9, 2019, 8:50 a.m. OK GNU C++17 TESTS 75 62 1433600 1700
63940493 JonathanR C Oct. 31, 2019, 5:19 p.m. OK GNU C++17 TESTS 75 62 2867200 1700
45510136 Photon_ C Nov. 10, 2018, 12:36 p.m. OK GNU C++17 TESTS 75 62 4096000 1700
54580846 Shridhar C May 25, 2019, 4:38 a.m. OK GNU C++17 TESTS 75 62 5427200 1700
53830527 quake0 C May 6, 2019, 7:36 p.m. OK GNU C++17 TESTS 75 77 1228800 1700
56623029 010000000010 C July 6, 2019, 12:38 p.m. OK GNU C++17 TESTS 75 77 1740800 1700
65928935 mr_backlog C Nov. 28, 2019, 7:45 p.m. OK GNU C++17 TESTS 75 77 2150400 1700
65583635 Muhammad_Mustafa C Nov. 23, 2019, 11:45 a.m. OK GNU C++17 TESTS 75 77 2867200 1700
18589654 MarcoXerox C June 19, 2016, 2:33 a.m. OK Haskell TESTS 75 546 14950400 1700
12043331 Empress C July 14, 2015, 2:30 p.m. OK Java 7 TESTS 75 124 0 1700
10817432 alicezhang05 C April 21, 2015, 10:38 p.m. OK Java 7 TESTS 75 140 47820800 1700
16890432 Nirmit C March 23, 2016, 3:47 p.m. OK Java 7 TESTS 75 171 46796800 1700
11131854 wonjohn.choi C May 18, 2015, 5:50 a.m. OK Java 7 TESTS 75 186 6246400 1700
14932237 DukeOfYork C Dec. 23, 2015, 1:54 a.m. OK Java 7 TESTS 75 187 716800 1700
11180802 slex C May 20, 2015, 5:29 p.m. OK Java 7 TESTS 75 296 0 1700
17142735 niting112 C April 3, 2016, 9:09 a.m. OK Java 7 TESTS 75 389 54988800 1700
12685434 iron-man C Aug. 24, 2015, 2:34 p.m. OK Java 7 TESTS 75 514 512000 1700
10565489 parse C April 4, 2015, 12:21 a.m. OK Java 7 TESTS 75 888 10137600 1700
10565479 parse C April 4, 2015, 12:18 a.m. OK Java 7 TESTS 75 889 10137600 1700
26967341 andrejerry1 C May 9, 2017, 4:23 a.m. OK Java 8 TESTS 75 171 0 1700
67177530 adarsh000321 C Dec. 18, 2019, 8:06 p.m. OK Java 8 TESTS 75 171 1536000 1700
56510746 Ad-007 C July 4, 2019, 10:14 a.m. OK Java 8 TESTS 75 171 3686400 1700
38127763 atarw C May 12, 2018, 4:45 a.m. OK Java 8 TESTS 75 171 20992000 1700
36398246 amolpratap007 C March 18, 2018, 7:59 p.m. OK Java 8 TESTS 75 171 21606400 1700
25381970 tomdmitriev C March 10, 2017, 2:26 p.m. OK Java 8 TESTS 75 171 26726400 1700
20484011 JayVeer C Sept. 9, 2016, 5:56 p.m. OK Java 8 TESTS 75 186 0 1700
53595034 barakraganosungam C May 1, 2019, 3:36 a.m. OK Java 8 TESTS 75 186 5427200 1700
58266867 _Sergey_ C Aug. 4, 2019, 2:56 p.m. OK Java 8 TESTS 75 187 0 1700
31231879 flyman3046 C Oct. 12, 2017, 4:24 a.m. OK Java 8 TESTS 75 187 0 1700
9455019 camypaper C Jan. 18, 2015, 10 a.m. OK MS C# TESTS 75 140 16179200 1700
31365917 phaserescu C Oct. 15, 2017, 1:06 p.m. OK MS C# TESTS 75 140 23961600 1700
56640567 vjudge2 C July 7, 2019, 1:12 a.m. OK MS C++ TESTS 75 61 819200 1700
12508750 SamuelTangz C Aug. 13, 2015, 5:37 p.m. OK MS C++ TESTS 75 61 921600 1700
9567656 Darkmatter C Jan. 27, 2015, 2:55 a.m. OK MS C++ TESTS 75 62 819200 1700
69845163 vjudge3 C Jan. 30, 2020, 2:09 p.m. OK MS C++ TESTS 75 62 921600 1700
12511878 SamuelTangz C Aug. 13, 2015, 6:02 p.m. OK MS C++ TESTS 75 62 921600 1700
36874952 vjudge5 C April 2, 2018, 10:18 a.m. OK MS C++ TESTS 75 62 4300800 1700
36874738 vjudge5 C April 2, 2018, 10:07 a.m. OK MS C++ TESTS 75 62 4505600 1700
14212946 vjudge4 C Nov. 12, 2015, noon OK MS C++ TESTS 75 78 3584000 1700
27878452 vjudge1 C June 18, 2017, 6:57 a.m. OK MS C++ TESTS 75 78 3993600 1700
69944049 vjudge2 C Feb. 1, 2020, 7:03 a.m. OK MS C++ TESTS 75 78 4812800 1700
55554052 ILgeRiT C June 14, 2019, 8:55 a.m. OK MS C++ 2017 TESTS 75 202 5017600 1700
11732264 komendart C June 24, 2015, 7:20 a.m. OK PyPy 3 TESTS 75 358 21299200 1700
11732311 komendart C June 24, 2015, 7:25 a.m. OK PyPy 3 TESTS 75 358 21401600 1700
62250676 arru C Oct. 10, 2019, 9:10 a.m. OK PyPy 3 TESTS 75 374 13721600 1700
19214700 SyntexError C July 18, 2016, 2:35 p.m. OK Python 2 TESTS 75 280 5734400 1700
11719772 SR421 C June 23, 2015, 8:52 a.m. OK Python 2 TESTS 75 296 6451200 1700
11404044 tejas.pandey C June 3, 2015, 4:07 p.m. OK Python 2 TESTS 75 296 10956800 1700
22021070 rangwani_harsh C Nov. 3, 2016, 7:12 p.m. OK Python 2 TESTS 75 311 9113600 1700
13769563 wateret C Oct. 21, 2015, 10:52 a.m. OK Python 2 TESTS 75 311 13209600 1700
9709503 Lei_Xufei C Feb. 4, 2015, 7 a.m. OK Python 2 TESTS 75 311 13414400 1700
11360707 Mr.Bluesman C May 30, 2015, 8:27 p.m. OK Python 2 TESTS 75 311 13926400 1700
35872188 ______u______ C March 3, 2018, 7:04 a.m. OK Python 2 TESTS 75 327 18124800 1700
35872084 ______n______ C March 3, 2018, 7:04 a.m. OK Python 2 TESTS 75 327 18124800 1700
35871485 _____i_____ C March 3, 2018, 6:52 a.m. OK Python 2 TESTS 75 327 18124800 1700
42135551 Mk_Python_v1 C Aug. 26, 2018, 11:20 p.m. OK Python 3 TESTS 75 234 8089600 1700
52550184 r57shell C April 10, 2019, 3:21 a.m. OK Python 3 TESTS 75 327 15667200 1700
68975127 nethish C Jan. 17, 2020, 8:31 a.m. OK Python 3 TESTS 75 358 14950400 1700
31231795 darkkcyan C Oct. 12, 2017, 4:12 a.m. OK Python 3 TESTS 75 592 9932800 1700
51872210 ashok123 C March 26, 2019, 5:55 p.m. OK Python 3 TESTS 75 592 10035200 1700
51872071 ashok123 C March 26, 2019, 5:51 p.m. OK Python 3 TESTS 75 607 10035200 1700
25297246 felipe17 C March 6, 2017, 4:21 p.m. OK Python 3 TESTS 75 701 14233600 1700
19180915 future_loops C July 16, 2016, 11:23 p.m. OK Python 3 TESTS 75 810 10444800 1700
31295363 ionescu.virgiliu C Oct. 14, 2017, 8:39 a.m. OK Python 3 TESTS 75 967 20172800 1700
69446974 kobae964 C Jan. 24, 2020, 3:45 a.m. OK Rust TESTS 75 93 8601600 1700

remove filters

Back to search problems