Educational Codeforces Round 78 (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
1278 Educational Codeforces Round 78 (Rated for Div. 2) FINISHED False 7200 160673087 Dec. 19, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8144 ) C Berry Jam PROGRAMMING data structures dp greedy implementation 1600

B'Karlsson has recently discovered a huge stock of berry jam jars in the basement of the house. More specifically, there were 2n jars of strawberry and blueberry jam. All the 2n jars are arranged in a row. The stairs to the basement are exactly in the middle of that row. So when Karlsson enters the basement, he sees exactly n jars to his left and n jars to his right. For example, the basement might look like this: Being the starightforward man he is, he immediately starts eating the jam. In one minute he chooses to empty either the first non-empty jar to his left or the first non-empty jar to his right. Finally, Karlsson decided that at the end the amount of full strawberry and blueberry jam jars should become the same. For example, this might be the result: Jars are numbered from 1 to 2n from left to right, so Karlsson initially stands between jars n and n+1 . What is the minimum number of jars Karlsson is required to empty so that an equal number of full strawberry and blueberry jam jars is left? Your program should answer t independent test cases. The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ). The second line of each test case contains 2n integers a_1, a_2, ... , a_{2n} ( 1 <= a_i <= 2 ) -- a_i=1 means that the i -th jar from the left is a strawberry jam jar and a_i=2 means that it is a blueberry jam jar. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case print the answer to it -- the minimum number of jars Karlsson is required to empty so that an equal number of full strawberry and blueberry jam jars is left. The picture from the statement describes the first test case. In the second test case the number of strawberry and blueberry jam jars is already equal. In the t'...

Tutorials

Educational Codeforces Round 78 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
67234242 daut-dlang C Dec. 19, 2019, 3:59 p.m. OK D TESTS 12 46 22425600 1600
67234939 ruban C Dec. 19, 2019, 4:02 p.m. OK Delphi TESTS 12 93 197324800 1600
67222255 LaSWeeG C Dec. 19, 2019, 3:10 p.m. OK FPC TESTS 12 46 32051200 1600
67276388 ChinmayKarnik C Dec. 20, 2019, 10:22 a.m. OK GNU C11 TESTS 12 46 2355200 1600
67397217 kaiboy C Dec. 22, 2019, 12:32 a.m. OK GNU C11 TESTS 12 46 2457600 1600
67239613 rainboy C Dec. 19, 2019, 4:23 p.m. OK GNU C11 TESTS 12 46 2457600 1600
67273784 akshatdalton C Dec. 20, 2019, 9:23 a.m. OK GNU C11 TESTS 12 61 4812800 1600
67227332 pengin_2000 C Dec. 19, 2019, 3:30 p.m. OK GNU C11 TESTS 12 312 2355200 1600
67220520 Zambia_Captain C Dec. 19, 2019, 3:04 p.m. OK GNU C++11 TESTS 12 30 2457600 1600
68146053 luogu_bot3 C Jan. 4, 2020, 4:27 a.m. OK GNU C++11 TESTS 12 31 1433600 1600
67266320 cheetose C Dec. 20, 2019, 6:20 a.m. OK GNU C++11 TESTS 12 31 2457600 1600
67263545 0qo_oq0 C Dec. 20, 2019, 4:57 a.m. OK GNU C++11 TESTS 12 31 3993600 1600
67257677 Frame233 C Dec. 20, 2019, 12:16 a.m. OK GNU C++11 TESTS 12 31 3993600 1600
67226530 MelonMeow_ylh C Dec. 19, 2019, 3:26 p.m. OK GNU C++11 TESTS 12 31 3993600 1600
67236092 z7z_Eta C Dec. 19, 2019, 4:07 p.m. OK GNU C++11 TESTS 12 31 4608000 1600
67238160 DQYdqy C Dec. 19, 2019, 4:17 p.m. OK GNU C++11 TESTS 12 31 4812800 1600
67231369 sun_of_Ice C Dec. 19, 2019, 3:46 p.m. OK GNU C++11 TESTS 12 31 4812800 1600
69557241 luogu_bot2 C Jan. 26, 2020, 9:17 a.m. OK GNU C++11 TESTS 12 31 5632000 1600
67244322 KaguraNana C Dec. 19, 2019, 4:54 p.m. OK GNU C++14 TESTS 12 30 4300800 1600
68594024 tokitsukaze C Jan. 11, 2020, 1:31 p.m. OK GNU C++14 TESTS 12 31 4300800 1600
67220970 CYBBB C Dec. 19, 2019, 3:06 p.m. OK GNU C++14 TESTS 12 31 20070400 1600
67223798 veqcc C Dec. 19, 2019, 3:16 p.m. OK GNU C++14 TESTS 12 46 1638400 1600
67221373 fluffyowl C Dec. 19, 2019, 3:07 p.m. OK GNU C++14 TESTS 12 46 1638400 1600
67234753 antguz C Dec. 19, 2019, 4:01 p.m. OK GNU C++14 TESTS 12 46 1638400 1600
67225167 Flavius C Dec. 19, 2019, 3:21 p.m. OK GNU C++14 TESTS 12 46 1638400 1600
67610010 _shango_ C Dec. 25, 2019, 3:02 p.m. OK GNU C++14 TESTS 12 46 1638400 1600
67656407 oevl C Dec. 26, 2019, 2:05 p.m. OK GNU C++14 TESTS 12 46 1638400 1600
67260042 TrungDuc2k2 C Dec. 20, 2019, 2:41 a.m. OK GNU C++14 TESTS 12 46 1638400 1600
67285178 Fyodor C Dec. 20, 2019, 2:06 p.m. OK GNU C++17 TESTS 12 31 1331200 1600
67269361 1813004846 C Dec. 20, 2019, 7:31 a.m. OK GNU C++17 TESTS 12 31 1536000 1600
67465068 lijiatu C Dec. 23, 2019, 10:44 a.m. OK GNU C++17 TESTS 12 31 2355200 1600
67258167 OBJECT.907 C Dec. 20, 2019, 12:54 a.m. OK GNU C++17 TESTS 12 31 3481600 1600
67494112 ULLONG_MAX C Dec. 23, 2019, 9:08 p.m. OK GNU C++17 TESTS 12 31 5529600 1600
67269314 1813004846 C Dec. 20, 2019, 7:30 a.m. OK GNU C++17 TESTS 12 46 1536000 1600
67391722 yhkee0404 C Dec. 21, 2019, 8:06 p.m. OK GNU C++17 TESTS 12 46 1536000 1600
68293297 copperium C Jan. 5, 2020, 11:35 p.m. OK GNU C++17 TESTS 12 46 1638400 1600
68391834 heno239 C Jan. 8, 2020, 9 a.m. OK GNU C++17 TESTS 12 46 1638400 1600
68757919 TooYoungTooSimp C Jan. 14, 2020, 8:22 a.m. OK GNU C++17 TESTS 12 46 1638400 1600
67314593 maguroguma C Dec. 21, 2019, 5:18 a.m. OK Go TESTS 12 93 5324800 1600
67225794 u1s1reallycai C Dec. 19, 2019, 3:23 p.m. OK Go TESTS 12 109 4505600 1600
67784390 cribabby C Dec. 28, 2019, 12:12 p.m. OK Java 11 TESTS 12 202 3072000 1600
67244695 lightseba C Dec. 19, 2019, 4:58 p.m. OK Java 11 TESTS 12 202 4096000 1600
67236644 Anonymous C Dec. 19, 2019, 4:10 p.m. OK Java 11 TESTS 12 202 4915200 1600
67290493 its_aks_ulure C Dec. 20, 2019, 3:28 p.m. OK Java 11 TESTS 12 202 5120000 1600
67225099 Musin C Dec. 19, 2019, 3:21 p.m. OK Java 11 TESTS 12 202 6758400 1600
67240693 machhra C Dec. 19, 2019, 4:28 p.m. OK Java 11 TESTS 12 217 0 1600
67317965 kiberKotleta2009 C Dec. 21, 2019, 6:52 a.m. OK Java 11 TESTS 12 217 5120000 1600
67273962 al_Jahy C Dec. 20, 2019, 9:27 a.m. OK Java 11 TESTS 12 218 2867200 1600
67370749 ankyy_0103 C Dec. 21, 2019, 2:09 p.m. OK Java 11 TESTS 12 218 3686400 1600
67285861 Azakarka C Dec. 20, 2019, 2:16 p.m. OK Java 11 TESTS 12 233 5120000 1600
68834079 SnowGoose C Jan. 15, 2020, 1:40 a.m. OK Java 8 TESTS 12 109 3481600 1600
67295273 ZeyadKhattab C Dec. 20, 2019, 4:45 p.m. OK Java 8 TESTS 12 124 0 1600
67288337 procrastinate7 C Dec. 20, 2019, 2:53 p.m. OK Java 8 TESTS 12 124 0 1600
67226165 polyakoff C Dec. 19, 2019, 3:25 p.m. OK Java 8 TESTS 12 124 0 1600
67225007 Agnimandur C Dec. 19, 2019, 3:20 p.m. OK Java 8 TESTS 12 124 0 1600
67419961 luchy0120 C Dec. 22, 2019, 11:17 a.m. OK Java 8 TESTS 12 124 4096000 1600
67416018 sooraj10 C Dec. 22, 2019, 9:54 a.m. OK Java 8 TESTS 12 124 44134400 1600
67286949 shaurya_singh C Dec. 20, 2019, 2:32 p.m. OK Java 8 TESTS 12 139 0 1600
67222171 7dan C Dec. 19, 2019, 3:10 p.m. OK Java 8 TESTS 12 139 1126400 1600
67391694 an09mous C Dec. 21, 2019, 8:05 p.m. OK Java 8 TESTS 12 139 1228800 1600
67230352 duckladydinh C Dec. 19, 2019, 3:42 p.m. OK Kotlin TESTS 12 140 9932800 1600
67283206 Spheniscine C Dec. 20, 2019, 1:37 p.m. OK Kotlin TESTS 12 202 9420800 1600
67224488 elizarov C Dec. 19, 2019, 3:19 p.m. OK Kotlin TESTS 12 217 3891200 1600
67627194 a11eca C Dec. 25, 2019, 11:03 p.m. OK Kotlin TESTS 12 342 11878400 1600
67224371 eki C Dec. 19, 2019, 3:18 p.m. OK Mono C# TESTS 12 93 9420800 1600
67259714 camypaper C Dec. 20, 2019, 2:24 a.m. OK Mono C# TESTS 12 93 11161600 1600
67224453 mban259 C Dec. 19, 2019, 3:18 p.m. OK Mono C# TESTS 12 93 13107200 1600
67224478 hibatibati C Dec. 19, 2019, 3:18 p.m. OK Mono C# TESTS 12 93 13619200 1600
68378918 sevimlikedicik C Jan. 7, 2020, 10:10 p.m. OK Mono C# TESTS 12 93 22425600 1600
68377297 sevimlikedicik C Jan. 7, 2020, 8:47 p.m. OK Mono C# TESTS 12 108 22528000 1600
67247966 sergmel C Dec. 19, 2019, 5:55 p.m. OK Mono C# TESTS 12 109 12902400 1600
67220474 tomomo2b2 C Dec. 19, 2019, 3:04 p.m. OK Mono C# TESTS 12 109 22937600 1600
67225997 plasma-effect C Dec. 19, 2019, 3:24 p.m. OK Mono C# TESTS 12 140 15667200 1600
69174601 vjudge2 C Jan. 20, 2020, 7:35 a.m. OK MS C++ TESTS 12 46 2457600 1600
67229622 tarattata1 C Dec. 19, 2019, 3:39 p.m. OK MS C++ TESTS 12 46 2662400 1600
67223604 platter C Dec. 19, 2019, 3:15 p.m. OK MS C++ TESTS 12 62 3174400 1600
67315303 vjudge1 C Dec. 21, 2019, 5:41 a.m. OK MS C++ TESTS 12 62 5222400 1600
68858465 vjudge1 C Jan. 15, 2020, 11:19 a.m. OK MS C++ TESTS 12 62 5222400 1600
68871312 vjudge1 C Jan. 15, 2020, 3:18 p.m. OK MS C++ TESTS 12 77 8806400 1600
67322654 vjudge1 C Dec. 21, 2019, 8:35 a.m. OK MS C++ 2017 TESTS 12 62 1638400 1600
67234837 youx C Dec. 19, 2019, 4:02 p.m. OK MS C++ 2017 TESTS 12 62 2355200 1600
67992562 catplatypus C Dec. 31, 2019, 6:04 a.m. OK MS C++ 2017 TESTS 12 77 4198400 1600
67233954 dkyun C Dec. 19, 2019, 3:58 p.m. OK MS C++ 2017 TESTS 12 77 5836800 1600
67221467 pichulia C Dec. 19, 2019, 3:07 p.m. OK MS C++ 2017 TESTS 12 77 6451200 1600
67462605 CrashMaster C Dec. 23, 2019, 9:48 a.m. OK MS C++ 2017 TESTS 12 93 3481600 1600
67992444 catplatypus C Dec. 31, 2019, 5:59 a.m. OK MS C++ 2017 TESTS 12 93 3993600 1600
68078950 ZA139 C Jan. 2, 2020, 1:40 p.m. OK MS C++ 2017 TESTS 12 93 3993600 1600
67322343 hrynb2 C Dec. 21, 2019, 8:29 a.m. OK MS C++ 2017 TESTS 12 109 2457600 1600
67244607 efyjef C Dec. 19, 2019, 4:57 p.m. OK MS C++ 2017 TESTS 12 124 2457600 1600
67223232 pajenegod C Dec. 19, 2019, 3:14 p.m. OK PyPy 2 TESTS 12 186 11980800 1600
67959876 vjudge4 C Dec. 30, 2019, 11:08 a.m. OK PyPy 2 TESTS 12 249 9216000 1600
67275287 aaa_bbb_ccc C Dec. 20, 2019, 9:57 a.m. OK PyPy 2 TESTS 12 249 11980800 1600
67460807 fortmax120 C Dec. 23, 2019, 9:05 a.m. OK PyPy 2 TESTS 12 249 13926400 1600
67239049 ashok123 C Dec. 19, 2019, 4:21 p.m. OK PyPy 2 TESTS 12 264 14745600 1600
67435674 MVP C Dec. 22, 2019, 5:02 p.m. OK PyPy 2 TESTS 12 265 9216000 1600
67423815 SoSooding C Dec. 22, 2019, 12:42 p.m. OK PyPy 2 TESTS 12 326 13414400 1600
67221805 r57shell C Dec. 19, 2019, 3:09 p.m. OK PyPy 3 TESTS 12 202 18022400 1600
67224569 titia C Dec. 19, 2019, 3:19 p.m. OK PyPy 3 TESTS 12 218 16896000 1600
67384340 chaudhary_19 C Dec. 21, 2019, 5:19 p.m. OK PyPy 3 TESTS 12 218 17100800 1600
69001205 ng24_7 C Jan. 17, 2020, 7:42 p.m. OK PyPy 3 TESTS 12 218 17203200 1600
67224638 pineriver C Dec. 19, 2019, 3:19 p.m. OK PyPy 3 TESTS 12 233 16384000 1600
67237902 Tihohon C Dec. 19, 2019, 4:16 p.m. OK PyPy 3 TESTS 12 233 17817600 1600
67226436 mitribunskiy C Dec. 19, 2019, 3:26 p.m. OK PyPy 3 TESTS 12 233 18124800 1600
67220508 cftt C Dec. 19, 2019, 3:04 p.m. OK PyPy 3 TESTS 12 234 18227200 1600
67301064 vaibhavsarda C Dec. 20, 2019, 6:45 p.m. OK PyPy 3 TESTS 12 248 14745600 1600
67230259 cgfs10000 C Dec. 19, 2019, 3:42 p.m. OK PyPy 3 TESTS 12 248 18329600 1600
67539088 soumyasarkar1998 C Dec. 24, 2019, 3:20 p.m. OK Python 2 TESTS 12 327 12083200 1600
67266781 hooded_sweater C Dec. 20, 2019, 6:31 a.m. OK Python 2 TESTS 12 389 11161600 1600
67233830 anonymous0314 C Dec. 19, 2019, 3:57 p.m. OK Python 2 TESTS 12 389 23756800 1600
67237149 Shee11 C Dec. 19, 2019, 4:12 p.m. OK Python 3 TESTS 12 186 11059200 1600
67238083 sotanishy C Dec. 19, 2019, 4:17 p.m. OK Python 3 TESTS 12 187 18739200 1600
67596212 Annvv C Dec. 25, 2019, 10:44 a.m. OK Python 3 TESTS 12 202 11059200 1600
68091143 III_Wolverine_III C Jan. 2, 2020, 6:12 p.m. OK Python 3 TESTS 12 202 17408000 1600
67329130 h8191 C Dec. 21, 2019, 10:54 a.m. OK Python 3 TESTS 12 202 18739200 1600
67237519 ostroumov C Dec. 19, 2019, 4:14 p.m. OK Python 3 TESTS 12 233 9216000 1600
67329940 motoras C Dec. 21, 2019, 11:07 a.m. OK Python 3 TESTS 12 234 10956800 1600
67219928 MathisHammel C Dec. 19, 2019, 3:02 p.m. OK Python 3 TESTS 12 249 18432000 1600
67248631 _apurv_ C Dec. 19, 2019, 6:09 p.m. OK Python 3 TESTS 12 264 10240000 1600
67487180 uselessmemo C Dec. 23, 2019, 5:55 p.m. OK Python 3 TESTS 12 265 10444800 1600
67252024 sansen C Dec. 19, 2019, 7:35 p.m. OK Rust TESTS 12 61 3276800 1600
67239231 alleycat-at-git C Dec. 19, 2019, 4:22 p.m. OK Rust TESTS 12 62 3891200 1600
69033340 akiradeveloper C Jan. 18, 2020, 8:34 a.m. OK Rust TESTS 12 62 8089600 1600
67222279 yakamoto C Dec. 19, 2019, 3:10 p.m. OK Scala TESTS 12 623 11776000 1600

remove filters

Back to search problems