Educational Codeforces Round 104 (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
1487 Educational Codeforces Round 104 (Rated for Div. 2) FINISHED False 7200 163005922 Feb. 15, 2021, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 5113 ) E Cheap Dinner PROGRAMMING data structures dp implementation sortings two pointers

Ivan wants to have a good dinner. A good dinner should consist of a first course, a second course, a drink, and a dessert. There are n_1 different types of first courses Ivan can buy (the i -th of them costs a_i coins), n_2 different types of second courses (the i -th of them costs b_i coins), n_3 different types of drinks (the i -th of them costs c_i coins) and n_4 different types of desserts (the i -th of them costs d_i coins). Some dishes don't go well with each other. There are m_1 pairs of first courses and second courses that don't go well with each other, m_2 pairs of second courses and drinks, and m_3 pairs of drinks and desserts that don't go well with each other. Ivan wants to buy exactly one first course, one second course, one drink, and one dessert so that they go well with each other, and the total cost of the dinner is the minimum possible. Help him to find the cheapest dinner option! The first line contains four integers n_1 , n_2 , n_3 and n_4 ( 1 <= n_i <= 150000 ) -- the number of types of first courses, second courses, drinks and desserts, respectively. Then four lines follow. The first line contains n_1 integers a_1, a_2, ... , a_{n_1} ( 1 <= a_i <= 10^8 ), where a_i is the cost of the i -th type of first course. Three next lines denote the costs of second courses, drinks, and desserts in the same way ( 1 <= b_i, c_i, d_i <= 10^8 ). The next line contains one integer m_1 ( 0 <= m_1 <= 200000 ) -- the number of pairs of first and second courses that don't go well with each other. Each of the next m_1 lines contains two integers x_i and y_i ( 1 <= x_i <= n_1 ; 1 <= y_i <= n_2 ) denoting that the first course number x_i doesn't go well with the second course number y_i . All these pairs are different. The block of pairs of second dishe

Tutorials

87873

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
107484002 rainboy E Feb. 15, 2021, 7:03 p.m. OK GNU C11 TESTS 52 358 12800000
107498092 fishcathu. E Feb. 16, 2021, 3:36 a.m. OK GNU C++11 TESTS 55 155 6451200
107494039 yljrpyq E Feb. 16, 2021, 12:41 a.m. OK GNU C++11 TESTS 55 156 23244800
107480592 fishcathu. E Feb. 15, 2021, 6:07 p.m. OK GNU C++11 TESTS 52 171 6451200
107504439 NamelessOIer E Feb. 16, 2021, 5:58 a.m. OK GNU C++11 TESTS 55 186 19046400
107465822 hehepig E Feb. 15, 2021, 4:27 p.m. OK GNU C++11 TESTS 52 186 173158400
107495279 Eric_Qian E Feb. 16, 2021, 1:51 a.m. OK GNU C++11 TESTS 55 187 15462400
107479801 zjjws E Feb. 15, 2021, 5:56 p.m. OK GNU C++11 TESTS 52 187 22118400
107498024 fishcathu. E Feb. 16, 2021, 3:35 a.m. OK GNU C++11 TESTS 55 202 6451200
107474529 CallmeChallenger E Feb. 15, 2021, 4:58 p.m. OK GNU C++11 TESTS 52 233 50176000
107467026 KurisuMakise E Feb. 15, 2021, 4:29 p.m. OK GNU C++11 TESTS 52 280 8806400
107496246 BHwujiashuai1234 E Feb. 16, 2021, 2:31 a.m. OK GNU C++14 TESTS 55 467 23961600
107482433 Peppa___Pig E Feb. 15, 2021, 6:35 p.m. OK GNU C++14 TESTS 52 483 14848000
107485090 yyyg E Feb. 15, 2021, 7:22 p.m. OK GNU C++14 TESTS 52 483 109158400
107485358 yyyg E Feb. 15, 2021, 7:27 p.m. OK GNU C++14 TESTS 52 499 115200000
107474545 Kwords E Feb. 15, 2021, 4:58 p.m. OK GNU C++14 TESTS 52 514 22630400
107499180 Vinhspm E Feb. 16, 2021, 4:07 a.m. OK GNU C++14 TESTS 55 514 26624000
107467259 _JJ E Feb. 15, 2021, 4:30 p.m. OK GNU C++14 TESTS 52 529 22323200
107483872 _Subrata E Feb. 15, 2021, 7:01 p.m. OK GNU C++14 TESTS 52 530 34713600
107465080 Ogneopasno E Feb. 15, 2021, 4:26 p.m. OK GNU C++14 TESTS 52 545 15769600
107493979 kareem98 E Feb. 16, 2021, 12:38 a.m. OK GNU C++14 TESTS 55 545 18739200
107493274 zucyo05 E Feb. 15, 2021, 11:52 p.m. OK GNU C++17 TESTS 55 140 111104000
107467664 zzlzzlzzl E Feb. 15, 2021, 4:30 p.m. OK GNU C++17 TESTS 52 249 103424000
107481703 3D_2y E Feb. 15, 2021, 6:24 p.m. OK GNU C++17 TESTS 52 467 13312000
107467549 Icontofig E Feb. 15, 2021, 4:30 p.m. OK GNU C++17 TESTS 52 483 26316800
107477851 Lcyanstars E Feb. 15, 2021, 5:31 p.m. OK GNU C++17 TESTS 52 498 25292800
107496422 srh... E Feb. 16, 2021, 2:37 a.m. OK GNU C++17 TESTS 55 499 13721600
107468364 renascencepjw0510 E Feb. 15, 2021, 4:32 p.m. OK GNU C++17 TESTS 52 499 16588800
107490200 Miguel235711 E Feb. 15, 2021, 9:30 p.m. OK GNU C++17 TESTS 52 514 11059200
107475070 BeautyYu E Feb. 15, 2021, 5:03 p.m. OK GNU C++17 TESTS 52 514 36249600
107499247 arujbansal E Feb. 16, 2021, 4:09 a.m. OK GNU C++17 TESTS 55 514 66355200
107469106 Sakuyalove E Feb. 15, 2021, 4:33 p.m. OK GNU C++17 (64) TESTS 52 326 75366400
107487120 rainboy E Feb. 15, 2021, 8:05 p.m. OK GNU C++17 (64) TESTS 52 343 8192000
107484618 rainboy E Feb. 15, 2021, 7:13 p.m. OK GNU C++17 (64) TESTS 52 358 13721600
107487617 kaiboy E Feb. 15, 2021, 8:16 p.m. OK GNU C++17 (64) TESTS 52 374 8294400
107477008 M0riarty E Feb. 15, 2021, 5:22 p.m. OK GNU C++17 (64) TESTS 52 436 14336000
107492282 minato E Feb. 15, 2021, 10:55 p.m. OK GNU C++17 (64) TESTS 52 436 23961600
107469443 sheaf E Feb. 15, 2021, 4:33 p.m. OK GNU C++17 (64) TESTS 52 436 30617600
107466142 sheaf E Feb. 15, 2021, 4:28 p.m. OK GNU C++17 (64) TESTS 52 451 30617600
107467611 wisest E Feb. 15, 2021, 4:30 p.m. OK GNU C++17 (64) TESTS 52 452 16179200
107464406 Mellor E Feb. 15, 2021, 4:24 p.m. OK GNU C++17 (64) TESTS 52 452 31948800
107477942 _Kee E Feb. 15, 2021, 5:32 p.m. OK Haskell TESTS 52 1575 90419200
107479340 Airflow E Feb. 15, 2021, 5:50 p.m. OK Haskell TESTS 52 2183 192409600
107492740 clyring E Feb. 15, 2021, 11:19 p.m. OK Haskell TESTS 52 2558 217600000
107473983 _merlin_ E Feb. 15, 2021, 4:54 p.m. OK Java 11 TESTS 52 795 80281600
107477362 ASoboll E Feb. 15, 2021, 5:25 p.m. OK Java 11 TESTS 52 1185 26931200
107485104 mennafadali E Feb. 15, 2021, 7:23 p.m. OK Java 11 TESTS 52 1497 122572800
107497181 pikachu_pika_pika E Feb. 16, 2021, 3:04 a.m. OK Java 11 TESTS 55 1762 184934400
107497071 pikachu_pika_pika E Feb. 16, 2021, 3:01 a.m. OK Java 11 TESTS 55 1777 184934400
107473685 blackBird E Feb. 15, 2021, 4:52 p.m. OK Java 11 TESTS 52 1980 171110400
107485048 mennafadali E Feb. 15, 2021, 7:21 p.m. OK Java 11 TESTS 52 2511 272076800
107484975 mennafadali E Feb. 15, 2021, 7:20 p.m. OK Java 11 TESTS 52 2588 272076800
107484816 mennafadali E Feb. 15, 2021, 7:17 p.m. OK Java 11 TESTS 52 2667 272076800
107466353 ika E Feb. 15, 2021, 4:28 p.m. OK Java 8 TESTS 52 514 13312000
107472944 hu_tao E Feb. 15, 2021, 4:47 p.m. OK Java 8 TESTS 52 1262 147558400
107469544 DylanSmith E Feb. 15, 2021, 4:33 p.m. OK Java 8 TESTS 52 1637 132710400
107478460 O_E E Feb. 15, 2021, 5:39 p.m. OK Java 8 TESTS 52 1699 107520000
107465332 Whiplash99 E Feb. 15, 2021, 4:26 p.m. OK Java 8 TESTS 52 1918 143462400
107470557 SlowLegendaryNoobMaster E Feb. 15, 2021, 4:34 p.m. OK Java 8 TESTS 52 1949 171315200
107471601 whiteChicken E Feb. 15, 2021, 4:40 p.m. OK Java 8 TESTS 52 2355 172339200
107495589 Spheniscine E Feb. 16, 2021, 2:06 a.m. OK Kotlin TESTS 55 514 10342400
107495823 Spheniscine E Feb. 16, 2021, 2:15 a.m. OK Kotlin TESTS 55 545 8396800
107495487 Spheniscine E Feb. 16, 2021, 2 a.m. OK Kotlin TESTS 55 873 47411200
107472782 sylvyrfysh E Feb. 15, 2021, 4:46 p.m. OK Kotlin TESTS 52 1684 48025600
107485132 sylvyrfysh E Feb. 15, 2021, 7:23 p.m. OK Kotlin TESTS 52 1700 51712000
107488816 koper E Feb. 15, 2021, 8:46 p.m. OK Kotlin TESTS 52 2059 125235200
107478510 praying_cqf E Feb. 15, 2021, 5:39 p.m. OK MS C++ TESTS 52 638 36044800
107476509 eSeF_ E Feb. 15, 2021, 5:17 p.m. OK .NET Core C# TESTS 52 1684 115507200
107476326 rishabnahar2025 E Feb. 15, 2021, 5:15 p.m. OK PyPy 2 TESTS 52 1777 72396800
107482329 at_f E Feb. 15, 2021, 6:34 p.m. OK PyPy 3 TESTS 52 1497 114892800
107474355 Mukundan314 E Feb. 15, 2021, 4:57 p.m. OK PyPy 3 TESTS 52 1575 71475200
107465360 nehan_der_thal E Feb. 15, 2021, 4:26 p.m. OK PyPy 3 TESTS 52 1700 78233600
107476402 not_tehlka E Feb. 15, 2021, 5:15 p.m. OK PyPy 3 TESTS 52 1716 101376000
107498594 brthyyjp E Feb. 16, 2021, 3:51 a.m. OK PyPy 3 TESTS 55 1855 122470400
107478803 brthyyjp E Feb. 15, 2021, 5:43 p.m. OK PyPy 3 TESTS 52 1965 92569600
107465154 cocopalm E Feb. 15, 2021, 4:26 p.m. OK PyPy 3 TESTS 52 2012 122265600
107492436 jimm89 E Feb. 15, 2021, 11:03 p.m. OK PyPy 3 TESTS 52 2089 116428800
107492411 jimm89 E Feb. 15, 2021, 11:01 p.m. OK PyPy 3 TESTS 52 2090 117760000
107464900 yinuowang E Feb. 15, 2021, 4:25 p.m. OK PyPy 3 TESTS 52 2152 100864000
107497650 sh1194 E Feb. 16, 2021, 3:22 a.m. OK Python 3 TESTS 55 2557 90112000
107497579 sh1194 E Feb. 16, 2021, 3:20 a.m. OK Python 3 TESTS 55 2636 90112000
107467327 cottoncotton E Feb. 15, 2021, 4:30 p.m. OK Rust TESTS 52 249 13926400
107474038 apilat E Feb. 15, 2021, 4:55 p.m. OK Rust TESTS 52 638 31129600

remove filters

Back to search problems