Educational Codeforces Round 50 (Rated for 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
1036 Educational Codeforces Round 50 (Rated for Div. 2) FINISHED False 7200 201194724 Sept. 7, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9457 ) D Vasya and Arrays PROGRAMMING greedy two pointers 1600

B'Vasya has two arrays A and B of lengths n and m , respectively. He can perform the following operation arbitrary number of times (possibly zero): he takes some consecutive subsegment of the array and replaces it with a single element, equal to the sum of all elements on this subsegment. For example, from the array [1, 10, 100, 1000, 10000] Vasya can obtain array [1, 1110, 10000] , and from array [1, 2, 3] Vasya can obtain array [6] . Two arrays A and B are considered equal if and only if they have the same length and for each valid i A_i = B_i . Vasya wants to perform some of these operations on array A , some on array B , in such a way that arrays A and B become equal. Moreover, the lengths of the resulting arrays should be maximal possible. Help Vasya to determine the maximum length of the arrays that he can achieve or output that it is impossible to make arrays A and B equal. The first line contains a single integer n~(1 <= n <= 3 cdot 10^5) -- the length of the first array. The second line contains n integers a_1, a_2, cdots, a_n~(1 <= a_i <= 10^9) -- elements of the array A . The third line contains a single integer m~(1 <= m <= 3 cdot 10^5) -- the length of the second array. The fourth line contains m integers b_1, b_2, cdots, b_m~(1 <= b_i <= 10^9) - elements of the array B . Print a single integer -- the maximum length of the resulting arrays after some operations were performed on arrays A and B in such a way that they became equal. If there is no way to make array equal, print "-1". '...

Tutorials

61727

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50053326 yp0413170337 D Feb. 17, 2019, 9:04 a.m. OK Clang++17 Diagnostics TESTS 113 233 5324800 1600
42666383 gaoqiong D Sept. 8, 2018, 8:04 a.m. OK Clang++17 Diagnostics TESTS 113 265 3174400 1600
42664313 gaoqiong D Sept. 8, 2018, 6:48 a.m. OK Clang++17 Diagnostics TESTS 113 280 5632000 1600
42646347 hexl D Sept. 7, 2018, 4:44 p.m. OK Clang++17 Diagnostics TESTS 113 296 1536000 1600
42664328 ACMWGR D Sept. 8, 2018, 6:49 a.m. OK Clang++17 Diagnostics TESTS 113 311 5632000 1600
44652496 vjudge5 D Oct. 21, 2018, 11:53 a.m. OK Clang++17 Diagnostics TESTS 113 686 13721600 1600
43191639 cpy D Sept. 21, 2018, 2:50 p.m. OK D TESTS 113 265 12492800 1600
42898960 ruban D Sept. 15, 2018, 5:32 p.m. OK Delphi TESTS 113 186 146329600 1600
42660312 ruban D Sept. 8, 2018, 3:34 a.m. OK Delphi TESTS 113 233 86835200 1600
42640588 ruban D Sept. 7, 2018, 4:13 p.m. OK Delphi TESTS 113 249 86835200 1600
42646652 nhuvinhpro123 D Sept. 7, 2018, 4:48 p.m. OK FPC TESTS 113 171 7270400 1600
43499021 TShT D Sept. 27, 2018, 4:13 p.m. OK FPC TESTS 113 171 16076800 1600
42638690 Ulanov_Victor D Sept. 7, 2018, 4:05 p.m. OK FPC TESTS 113 186 2457600 1600
43072300 ZuZKho D Sept. 19, 2018, 9:55 a.m. OK FPC TESTS 113 187 2457600 1600
43370808 lie_b D Sept. 24, 2018, 2:24 p.m. OK FPC TESTS 113 187 4812800 1600
45232341 chaorenhaha D Nov. 3, 2018, 7:41 a.m. OK FPC TESTS 113 187 7987200 1600
42745036 darkus-_- D Sept. 10, 2018, 6:34 p.m. OK FPC TESTS 113 218 2457600 1600
43067495 vjudge5 D Sept. 19, 2018, 6:44 a.m. OK FPC TESTS 113 763 9625600 1600
69648612 romarioputra D Jan. 28, 2020, 3:36 a.m. OK GNU C11 TESTS 113 124 2355200 1600
42865249 chaitu610 D Sept. 14, 2018, 3:14 p.m. OK GNU C11 TESTS 113 140 2355200 1600
42697474 pandrei D Sept. 9, 2018, 8:17 a.m. OK GNU C11 TESTS 113 140 2457600 1600
42644398 kMonkey D Sept. 7, 2018, 4:30 p.m. OK GNU C11 TESTS 113 140 2457600 1600
42654931 sansen D Sept. 7, 2018, 9:12 p.m. OK GNU C11 TESTS 113 140 2457600 1600
42778493 sherifmowafy_ D Sept. 11, 2018, 7:08 p.m. OK GNU C11 TESTS 113 140 3174400 1600
50203229 rainboy D Feb. 19, 2019, 6:03 p.m. OK GNU C11 TESTS 113 140 4812800 1600
67618149 Trinadh724 D Dec. 25, 2019, 5:37 p.m. OK GNU C11 TESTS 113 155 9625600 1600
42654277 raja_123 D Sept. 7, 2018, 8:38 p.m. OK GNU C11 TESTS 113 156 2355200 1600
42637970 skarlord D Sept. 7, 2018, 4:01 p.m. OK GNU C11 TESTS 113 171 4812800 1600
42640888 Canophia D Sept. 7, 2018, 4:15 p.m. OK GNU C++11 TESTS 113 46 2252800 1600
44723670 luogu_bot4 D Oct. 23, 2018, 6:54 a.m. OK GNU C++11 TESTS 113 46 2252800 1600
45399143 Rye_Catcher D Nov. 7, 2018, 7:14 a.m. OK GNU C++11 TESTS 113 46 2457600 1600
43282713 cyc2016 D Sept. 23, 2018, 6:30 a.m. OK GNU C++11 TESTS 113 46 2457600 1600
42646342 HolyRomanEmpire D Sept. 7, 2018, 4:44 p.m. OK GNU C++11 TESTS 113 46 2457600 1600
64204957 Llf0703 D Nov. 4, 2019, 12:36 p.m. OK GNU C++11 TESTS 113 46 2457600 1600
45443415 vjudge2 D Nov. 8, 2018, 12:15 p.m. OK GNU C++11 TESTS 113 46 2457600 1600
45399086 vjudge1 D Nov. 7, 2018, 7:12 a.m. OK GNU C++11 TESTS 113 46 2457600 1600
42637111 xywsxp D Sept. 7, 2018, 3:58 p.m. OK GNU C++11 TESTS 113 46 2662400 1600
42760668 zhuiyi D Sept. 11, 2018, 10:21 a.m. OK GNU C++11 TESTS 113 46 2764800 1600
48581278 .tx D Jan. 19, 2019, 4:45 p.m. OK GNU C++14 TESTS 113 46 2457600 1600
42696008 ReaLNero1 D Sept. 9, 2018, 7:12 a.m. OK GNU C++14 TESTS 113 46 2560000 1600
45416965 limn2o4 D Nov. 7, 2018, 2:49 p.m. OK GNU C++14 TESTS 113 46 2560000 1600
42669466 practer D Sept. 8, 2018, 10:06 a.m. OK GNU C++14 TESTS 113 61 2560000 1600
42637475 Linkus D Sept. 7, 2018, 3:59 p.m. OK GNU C++14 TESTS 113 62 2355200 1600
43506494 g13 D Sept. 27, 2018, 7:40 p.m. OK GNU C++14 TESTS 113 62 2457600 1600
42752048 tttuongquang D Sept. 11, 2018, 3:15 a.m. OK GNU C++14 TESTS 113 62 2764800 1600
42653720 mittal21 D Sept. 7, 2018, 8:13 p.m. OK GNU C++14 TESTS 113 62 6451200 1600
53707118 Reventon D May 3, 2019, 1:46 p.m. OK GNU C++14 TESTS 113 124 2457600 1600
53709623 Reventon D May 3, 2019, 2:55 p.m. OK GNU C++14 TESTS 113 124 2457600 1600
69194083 910306264 D Jan. 20, 2020, 2:22 p.m. OK GNU C++17 TESTS 113 46 3481600 1600
69194719 910306264 D Jan. 20, 2020, 2:34 p.m. OK GNU C++17 TESTS 113 46 5427200 1600
42646538 Buzhibujue D Sept. 7, 2018, 4:46 p.m. OK GNU C++17 TESTS 113 61 5120000 1600
69195231 910306264 D Jan. 20, 2020, 2:43 p.m. OK GNU C++17 TESTS 113 61 5427200 1600
42644516 Monic D Sept. 7, 2018, 4:31 p.m. OK GNU C++17 TESTS 113 77 5017600 1600
42645228 asya.melody D Sept. 7, 2018, 4:33 p.m. OK GNU C++17 TESTS 113 78 11059200 1600
43371205 vjudge2 D Sept. 24, 2018, 2:35 p.m. OK GNU C++17 TESTS 113 93 16486400 1600
43371309 vjudge1 D Sept. 24, 2018, 2:38 p.m. OK GNU C++17 TESTS 113 93 16486400 1600
46774844 andrew4936 D Dec. 8, 2018, 7:31 p.m. OK GNU C++17 TESTS 113 109 2457600 1600
48703939 2018329621146 D Jan. 22, 2019, 4:51 a.m. OK GNU C++17 TESTS 113 124 2355200 1600
42786673 fr0st D Sept. 12, 2018, 4:58 a.m. OK Go TESTS 113 561 10444800 1600
42776022 fr0st D Sept. 11, 2018, 5:34 p.m. OK Go TESTS 113 576 10547200 1600
42685066 cacophonix D Sept. 8, 2018, 6:47 p.m. OK Go TESTS 113 670 22835200 1600
42791785 treasuryonly D Sept. 12, 2018, 9:01 a.m. OK Go TESTS 113 686 15462400 1600
42791803 treasuryonly D Sept. 12, 2018, 9:02 a.m. OK Go TESTS 113 717 14336000 1600
43414720 Marii D Sept. 25, 2018, 2:58 p.m. OK Go TESTS 113 733 14336000 1600
42740780 EduardoHi D Sept. 10, 2018, 4:08 p.m. OK Haskell TESTS 113 217 23347200 1600
42718855 EduardoHi D Sept. 9, 2018, 9:37 p.m. OK Haskell TESTS 113 218 23347200 1600
42747736 eidan D Sept. 10, 2018, 8:58 p.m. OK Haskell TESTS 113 264 22220800 1600
68952941 Codess D Jan. 16, 2020, 6:43 p.m. OK Java 11 TESTS 113 982 16281600 1600
65934248 bluesky111 D Nov. 29, 2019, 12:09 a.m. OK Java 8 TESTS 113 140 0 1600
47881804 noobspotted D Jan. 3, 2019, 6:49 p.m. OK Java 8 TESTS 113 155 0 1600
42650532 ankurverma1994 D Sept. 7, 2018, 6:13 p.m. OK Java 8 TESTS 113 155 0 1600
42813627 chandan5284 D Sept. 12, 2018, 10:32 p.m. OK Java 8 TESTS 113 156 0 1600
42678016 AQT D Sept. 8, 2018, 2:45 p.m. OK Java 8 TESTS 113 156 0 1600
43797158 avijit_agarwal D Oct. 4, 2018, 3:58 p.m. OK Java 8 TESTS 113 170 4505600 1600
49536094 Pratik_Rajani D Feb. 6, 2019, 4:02 p.m. OK Java 8 TESTS 113 171 0 1600
42960954 ViciousCoder D Sept. 16, 2018, 7:06 p.m. OK Java 8 TESTS 113 171 0 1600
42892348 apurvaj D Sept. 15, 2018, 1:36 p.m. OK Java 8 TESTS 113 171 0 1600
42791970 xodiac D Sept. 12, 2018, 9:08 a.m. OK Java 8 TESTS 113 171 0 1600
42656112 wleung_bvg D Sept. 7, 2018, 10:24 p.m. OK Kotlin TESTS 113 155 0 1600
59137149 vjudge1 D Aug. 20, 2019, 1:04 p.m. OK Kotlin TESTS 113 280 16486400 1600
59430185 vjudge3 D Aug. 25, 2019, 5:49 a.m. OK Kotlin TESTS 113 327 25395200 1600
59138155 vjudge5 D Aug. 20, 2019, 1:24 p.m. OK Kotlin TESTS 113 327 27340800 1600
59135349 vjudge2 D Aug. 20, 2019, 12:28 p.m. OK Kotlin TESTS 113 951 0 1600
55929532 og.kostya D June 22, 2019, 10:49 a.m. OK Mono C# TESTS 113 93 2355200 1600
43515854 witchu D Sept. 28, 2018, 4:39 a.m. OK Mono C# TESTS 113 296 61132800 1600
46516447 niklaci D Dec. 2, 2018, 4:37 p.m. OK Mono C# TESTS 113 296 61132800 1600
51870945 nemars D March 26, 2019, 5:22 p.m. OK Mono C# TESTS 113 311 62361600 1600
42792680 omikad D Sept. 12, 2018, 9:36 a.m. OK Mono C# TESTS 113 327 57856000 1600
43165810 eki D Sept. 21, 2018, 4:58 a.m. OK Mono C# TESTS 113 327 65024000 1600
42869519 TrinidadTobago D Sept. 14, 2018, 5:55 p.m. OK Mono C# TESTS 113 327 65024000 1600
42635358 GustavK D Sept. 7, 2018, 3:49 p.m. OK Mono C# TESTS 113 342 52736000 1600
43239288 NarkomDe D Sept. 22, 2018, 9:18 a.m. OK Mono C# TESTS 113 342 63590400 1600
42775860 fr0st D Sept. 11, 2018, 5:29 p.m. OK Mono C# TESTS 113 342 93593600 1600
42691958 lxn D Sept. 9, 2018, 2:38 a.m. OK MS C++ TESTS 113 62 5120000 1600
48711396 kaguya_tsuki D Jan. 22, 2019, 8:44 a.m. OK MS C++ TESTS 113 109 2867200 1600
48486848 vjudge1 D Jan. 17, 2019, 8:47 a.m. OK MS C++ TESTS 113 124 2355200 1600
48486801 vjudge4 D Jan. 17, 2019, 8:45 a.m. OK MS C++ TESTS 113 124 2355200 1600
61420423 vjudge2 D Sept. 28, 2019, 11:35 a.m. OK MS C++ TESTS 113 124 2457600 1600
51005127 vjudge5 D March 8, 2019, 8:53 a.m. OK MS C++ TESTS 113 124 2457600 1600
61692261 vjudge4 D Oct. 2, 2019, 6 a.m. OK MS C++ TESTS 113 124 2457600 1600
66305114 vjudge4 D Dec. 5, 2019, 9:01 a.m. OK MS C++ TESTS 113 124 2457600 1600
66307280 vjudge2 D Dec. 5, 2019, 9:55 a.m. OK MS C++ TESTS 113 124 2457600 1600
42758042 vjudge5 D Sept. 11, 2018, 8:42 a.m. OK MS C++ TESTS 113 124 2662400 1600
51460026 petko_mitkov D March 18, 2019, 7:04 p.m. OK MS C++ 2017 TESTS 113 187 4812800 1600
52952917 hwangganzi D April 18, 2019, 12:38 p.m. OK MS C++ 2017 TESTS 113 187 4812800 1600
63290840 pmitkov D Oct. 24, 2019, 11:42 a.m. OK MS C++ 2017 TESTS 113 187 4812800 1600
61869442 vjudge2 D Oct. 4, 2019, 5:38 p.m. OK MS C++ 2017 TESTS 113 187 4812800 1600
68955669 AleksanderBalobanov D Jan. 16, 2020, 7:59 p.m. OK MS C++ 2017 TESTS 113 202 2662400 1600
65424780 ddddu D Nov. 20, 2019, 10:19 a.m. OK MS C++ 2017 TESTS 113 202 2662400 1600
66547841 siferkate D Dec. 9, 2019, 1:50 p.m. OK MS C++ 2017 TESTS 113 545 2662400 1600
51655492 Still_Theory D March 21, 2019, 9:12 p.m. OK MS C++ 2017 TESTS 113 545 4812800 1600
66588710 yuanyuan2048 D Dec. 10, 2019, 12:11 p.m. OK MS C++ 2017 TESTS 113 545 5120000 1600
66548918 De_Line D Dec. 9, 2019, 2:09 p.m. OK MS C++ 2017 TESTS 113 546 2662400 1600
42792374 veta D Sept. 12, 2018, 9:25 a.m. OK PascalABC.NET TESTS 113 483 6144000 1600
43681776 mayakin D Oct. 2, 2018, 10:35 a.m. OK PHP TESTS 113 202 60518400 1600
43681673 mayakin D Oct. 2, 2018, 10:31 a.m. OK PHP TESTS 113 218 60518400 1600
42971253 soumyasarkar1998 D Sept. 17, 2018, 6:33 a.m. OK PyPy 2 TESTS 113 280 23756800 1600
42868447 sasasagagaga D Sept. 14, 2018, 5:14 p.m. OK PyPy 2 TESTS 113 311 23756800 1600
42639750 pavankatta D Sept. 7, 2018, 4:10 p.m. OK PyPy 2 TESTS 113 327 22220800 1600
42868616 sasasagagaga D Sept. 14, 2018, 5:21 p.m. OK PyPy 2 TESTS 113 327 23961600 1600
45395287 alankrit_singh_1 D Nov. 7, 2018, 3:38 a.m. OK PyPy 2 TESTS 113 343 43110400 1600
42635378 zacker-22 D Sept. 7, 2018, 3:49 p.m. OK PyPy 2 TESTS 113 389 24576000 1600
42635846 aaravzen D Sept. 7, 2018, 3:51 p.m. OK PyPy 2 TESTS 113 405 23756800 1600
42649847 morgo D Sept. 7, 2018, 5:52 p.m. OK PyPy 2 TESTS 113 436 43110400 1600
42640638 YESMAths D Sept. 7, 2018, 4:14 p.m. OK PyPy 2 TESTS 113 483 58880000 1600
42669198 p4thet1c D Sept. 8, 2018, 9:58 a.m. OK PyPy 2 TESTS 113 826 23756800 1600
65269771 vjudge2 D Nov. 17, 2019, 7:04 p.m. OK PyPy 3 TESTS 113 685 29491200 1600
67978400 rodrigods D Dec. 30, 2019, 5:59 p.m. OK PyPy 3 TESTS 113 701 30310400 1600
53891425 ahManoTravei D May 9, 2019, 12:40 a.m. OK PyPy 3 TESTS 113 701 45260800 1600
42639925 Tejkiran D Sept. 7, 2018, 4:10 p.m. OK PyPy 3 TESTS 113 717 36147200 1600
48268776 Praxis D Jan. 11, 2019, 10:55 p.m. OK PyPy 3 TESTS 113 717 44748800 1600
65216169 vjudge3 D Nov. 16, 2019, 6:40 p.m. OK PyPy 3 TESTS 113 717 45260800 1600
53891455 vjudge1 D May 9, 2019, 12:42 a.m. OK PyPy 3 TESTS 113 717 45875200 1600
42643912 I.Gleb D Sept. 7, 2018, 4:28 p.m. OK PyPy 3 TESTS 113 732 36454400 1600
42656320 rareone0602 D Sept. 7, 2018, 10:42 p.m. OK PyPy 3 TESTS 113 733 36352000 1600
65216109 Gabs96 D Nov. 16, 2019, 6:38 p.m. OK PyPy 3 TESTS 113 733 45465600 1600
61678927 mateusqc D Oct. 1, 2019, 10:39 p.m. OK Python 2 TESTS 113 670 21606400 1600
53930641 vjudge1 D May 9, 2019, 5:33 p.m. OK Python 2 TESTS 113 701 23961600 1600
54075871 vjudge3 D May 13, 2019, 7:54 p.m. OK Python 2 TESTS 113 717 21606400 1600
54258485 tatianeaf D May 16, 2019, 10:12 p.m. OK Python 2 TESTS 113 717 21913600 1600
61678945 vjudge3 D Oct. 1, 2019, 10:40 p.m. OK Python 2 TESTS 113 732 21606400 1600
46294431 EoinDavey D Nov. 27, 2018, 11:41 p.m. OK Python 2 TESTS 113 733 21708800 1600
54363804 vjudge1 D May 18, 2019, 11:31 p.m. OK Python 2 TESTS 113 748 21606400 1600
54363745 thalyta D May 18, 2019, 11:26 p.m. OK Python 2 TESTS 113 748 21606400 1600
54151691 vjudge1 D May 15, 2019, 12:54 a.m. OK Python 2 TESTS 113 748 21606400 1600
54175714 vjudge1 D May 15, 2019, 1:48 p.m. OK Python 2 TESTS 113 748 21708800 1600
44066208 vignesh_mj_1997 D Oct. 10, 2018, 9:28 a.m. OK Python 3 TESTS 113 498 49356800 1600
47510635 alvinpiter D Dec. 26, 2018, 6:16 a.m. OK Python 3 TESTS 113 545 34099200 1600
47510493 alvinpiter D Dec. 26, 2018, 6:10 a.m. OK Python 3 TESTS 113 561 33996800 1600
42826265 rickya D Sept. 13, 2018, 10:22 a.m. OK Python 3 TESTS 113 561 34099200 1600
48046036 HomeDragon D Jan. 7, 2019, 3:05 a.m. OK Python 3 TESTS 113 576 34508800 1600
61393146 vjudge3 D Sept. 27, 2019, 11:32 p.m. OK Python 3 TESTS 113 607 34406400 1600
49968859 111vad111 D Feb. 15, 2019, 11:25 p.m. OK Python 3 TESTS 113 608 33996800 1600
68905827 nealzane D Jan. 16, 2020, 6:48 a.m. OK Python 3 TESTS 113 608 34099200 1600
48769760 toysheeyeyraku D Jan. 22, 2019, 10:16 p.m. OK Python 3 TESTS 113 608 34406400 1600
46821658 Tauzn D Dec. 9, 2018, 3:39 p.m. OK Python 3 TESTS 113 608 41574400 1600
42784633 niquefa_diego D Sept. 12, 2018, 2:39 a.m. OK Ruby TESTS 113 998 98406400 1600
42799332 vain0 D Sept. 12, 2018, 1:27 p.m. OK Rust TESTS 113 171 14643200 1600
42638546 yakamoto D Sept. 7, 2018, 4:04 p.m. OK Scala TESTS 113 811 24678400 1600
42638827 xDEMONx D Sept. 7, 2018, 4:06 p.m. OK Scala TESTS 113 904 0 1600

remove filters

Back to search problems