Educational Codeforces Round 73 (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
1221 Educational Codeforces Round 73 (Rated for Div. 2) FINISHED False 7200 162919499 Sept. 19, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9189 ) D Make The Fence Great Again PROGRAMMING dp 1700

B"You have a fence consisting of n vertical boards. The width of each board is 1 . The height of the i -th board is a_i . You think that the fence is great if there is no pair of adjacent boards having the same height. More formally, the fence is great if and only if for all indices from 2 to n , the condition a_{i-1} neq a_i holds. Unfortunately, it is possible that now your fence is not great. But you can change it! You can increase the length of the i -th board by 1 , but you have to pay b_i rubles for it. The length of each board can be increased any number of times (possibly, zero). Calculate the minimum number of rubles you have to spend to make the fence great again! You have to answer q independent queries. The first line contains one integer q ( 1 <= q <= 3 cdot 10^5 ) -- the number of queries. The first line of each query contains one integers n ( 1 <= n <= 3 cdot 10^5 ) -- the number of boards in the fence. The following n lines of each query contain the descriptions of the boards. The i -th line contains two integers a_i and b_i ( 1 <= a_i, b_i <= 10^9 ) -- the length of the i -th board and the price for increasing it by 1 , respectively. It is guaranteed that sum of all n over all queries not exceed 3 cdot 10^5 . It is guaranteed that answer to each query will not exceed 10^{18} . For each query print one integer -- the minimum number of rubles you have to spend to make the fence great. In the first query you have to increase the length of second board by 2 . So your total costs if 2 cdot b_2 = 2 . In the second query you have to increase the length of first board by 1 and the length of third board by 1 . So your total costs if 1 cdot b_1 + 1 cdot b_3 = 9 . In the third query the fence is great initially, so you don't need to spend rubles. "...

Tutorials

Разбор Educational Codeforces Round 73

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
61461008 pkm17 D Sept. 29, 2019, 8:33 a.m. OK FPC TESTS 35 1045 12083200 1700
61608883 TranKha D Oct. 1, 2019, 1:32 p.m. OK FPC TESTS 35 1153 40038400 1700
61694299 Felix555 D Oct. 2, 2019, 6:34 a.m. OK GNU C11 TESTS 35 1045 11980800 1700
60896148 rainboy D Sept. 19, 2019, 6:52 p.m. OK GNU C11 TESTS 34 1075 9625600 1700
61052572 NhidA D Sept. 22, 2019, 7:01 a.m. OK GNU C11 TESTS 35 1076 11980800 1700
61108770 M_Nishant D Sept. 23, 2019, 10:24 a.m. OK GNU C11 TESTS 35 1091 11980800 1700
60934127 YOK D Sept. 20, 2019, 2:42 p.m. OK GNU C11 TESTS 35 1091 11980800 1700
61441811 Romul D Sept. 28, 2019, 7:05 p.m. OK GNU C11 TESTS 35 1107 0 1700
60886603 Chipe1 D Sept. 19, 2019, 4:26 p.m. OK GNU C11 TESTS 34 1107 36044800 1700
61046602 Justin108 D Sept. 22, 2019, 4:47 a.m. OK GNU C11 TESTS 35 1123 11980800 1700
62972125 LmfEthan D Oct. 20, 2019, 7:17 a.m. OK GNU C11 TESTS 35 1138 11980800 1700
64905677 woookie41 D Nov. 14, 2019, 9:38 p.m. OK GNU C11 TESTS 35 1216 11980800 1700
60927357 Fortran_must_add_too D Sept. 20, 2019, 12:40 p.m. OK GNU C++11 TESTS 35 62 0 1700
60970952 chenyewei_1234 D Sept. 21, 2019, 7:17 a.m. OK GNU C++11 TESTS 35 62 2252800 1700
63208284 Binary_Search_Tree D Oct. 23, 2019, 1:49 a.m. OK GNU C++11 TESTS 35 62 32051200 1700
62090721 shuashuawan D Oct. 8, 2019, 5:29 a.m. OK GNU C++11 TESTS 35 77 9625600 1700
60883502 yaozhuojiang D Sept. 19, 2019, 4:12 p.m. OK GNU C++11 TESTS 34 77 11776000 1700
61059436 sun_of_Ice D Sept. 22, 2019, 9:03 a.m. OK GNU C++11 TESTS 35 77 11980800 1700
67139937 HellollWorld D Dec. 18, 2019, 6:17 a.m. OK GNU C++11 TESTS 35 77 132300800 1700
61041825 hhhjhy D Sept. 22, 2019, 1:14 a.m. OK GNU C++11 TESTS 35 78 9625600 1700
61063470 sun_of_Ice D Sept. 22, 2019, 10:14 a.m. OK GNU C++11 TESTS 35 78 11980800 1700
61602752 Adelard D Oct. 1, 2019, 11:40 a.m. OK GNU C++11 TESTS 35 78 11980800 1700
60903786 wleung_bvg D Sept. 20, 2019, 12:39 a.m. OK GNU C++14 TESTS 34 62 12185600 1700
61459924 A_root_A D Sept. 29, 2019, 8:05 a.m. OK GNU C++14 TESTS 35 62 12185600 1700
60884488 zhixiang D Sept. 19, 2019, 4:17 p.m. OK GNU C++14 TESTS 34 77 50380800 1700
60889719 daofaziran D Sept. 19, 2019, 4:45 p.m. OK GNU C++14 TESTS 34 78 9728000 1700
60884134 zhixiang D Sept. 19, 2019, 4:15 p.m. OK GNU C++14 TESTS 34 78 50380800 1700
60938694 HipHop D Sept. 20, 2019, 4:16 p.m. OK GNU C++14 TESTS 35 187 7168000 1700
60921242 vinayrajmanchala D Sept. 20, 2019, 10:42 a.m. OK GNU C++14 TESTS 34 187 9625600 1700
62934628 Helman D Oct. 19, 2019, 1:44 p.m. OK GNU C++14 TESTS 35 187 9625600 1700
60884457 HipHop D Sept. 19, 2019, 4:17 p.m. OK GNU C++14 TESTS 34 202 9625600 1700
63286831 mann_ni_maanta D Oct. 24, 2019, 10:38 a.m. OK GNU C++14 TESTS 35 218 9625600 1700
60914239 nickluo D Sept. 20, 2019, 7:24 a.m. OK GNU C++17 TESTS 34 124 3686400 1700
62436920 ioyeoa D Oct. 12, 2019, 5:49 p.m. OK GNU C++17 TESTS 35 155 15872000 1700
62405364 stargazerZJ D Oct. 12, 2019, 8:47 a.m. OK GNU C++17 TESTS 35 202 0 1700
60911279 forget D Sept. 20, 2019, 6:03 a.m. OK GNU C++17 TESTS 34 202 0 1700
60905274 i_lower D Sept. 20, 2019, 2:01 a.m. OK GNU C++17 TESTS 34 202 10854400 1700
63764946 dream_dreamer D Oct. 30, 2019, 5:48 a.m. OK GNU C++17 TESTS 35 202 14438400 1700
60885328 CQXYM D Sept. 19, 2019, 4:21 p.m. OK GNU C++17 TESTS 34 217 9625600 1700
62975322 vjudge4 D Oct. 20, 2019, 8:23 a.m. OK GNU C++17 TESTS 35 218 11980800 1700
69240001 thtsshz_bgwrswh D Jan. 21, 2020, 11:03 a.m. OK GNU C++17 TESTS 35 218 11980800 1700
60916506 ikolcov D Sept. 20, 2019, 8:29 a.m. OK GNU C++17 TESTS 34 233 2355200 1700
62048708 synapse D Oct. 7, 2019, 8:47 a.m. OK Go TESTS 35 592 5427200 1700
61986713 synapse D Oct. 6, 2019, 1:46 p.m. OK Go TESTS 35 592 5427200 1700
61985922 synapse D Oct. 6, 2019, 1:32 p.m. OK Go TESTS 35 592 14336000 1700
62048363 synapse D Oct. 7, 2019, 8:40 a.m. OK Go TESTS 35 592 23244800 1700
62592456 sighduck D Oct. 14, 2019, 10:08 p.m. OK Go TESTS 35 701 18841600 1700
61048347 cs_office D Sept. 22, 2019, 5:30 a.m. OK Go TESTS 35 1170 143564800 1700
61468367 jegfault D Sept. 29, 2019, 11:19 a.m. OK Haskell TESTS 35 1778 183910400 1700
66270756 lpls1 D Dec. 4, 2019, 12:13 p.m. OK Java 11 TESTS 35 1231 12697600 1700
60910028 iceburst D Sept. 20, 2019, 5:20 a.m. OK Java 8 TESTS 34 187 0 1700
61293560 mbfeci D Sept. 25, 2019, 10:41 p.m. OK Java 8 TESTS 35 202 0 1700
60906462 Dukkha D Sept. 20, 2019, 2:54 a.m. OK Java 8 TESTS 34 202 0 1700
60910955 rustie D Sept. 20, 2019, 5:52 a.m. OK Java 8 TESTS 34 217 4710400 1700
60905082 jenish9599 D Sept. 20, 2019, 1:52 a.m. OK Java 8 TESTS 34 233 16486400 1700
60890502 KharYusuf D Sept. 19, 2019, 4:56 p.m. OK Java 8 TESTS 34 233 16588800 1700
60919723 jakejase2 D Sept. 20, 2019, 10:02 a.m. OK Java 8 TESTS 34 233 17920000 1700
61386474 rohan03 D Sept. 27, 2019, 7:19 p.m. OK Java 8 TESTS 35 233 18739200 1700
60891239 KharYusuf D Sept. 19, 2019, 5:07 p.m. OK Java 8 TESTS 34 234 16179200 1700
62321997 amolpratap007 D Oct. 10, 2019, 5:03 p.m. OK Java 8 TESTS 35 234 61747200 1700
61030462 schmak.ekb D Sept. 21, 2019, 5:30 p.m. OK Kotlin TESTS 35 264 2560000 1700
61030916 schmak.ekb D Sept. 21, 2019, 5:40 p.m. OK Kotlin TESTS 35 265 2560000 1700
60907612 Spheniscine D Sept. 20, 2019, 3:39 a.m. OK Kotlin TESTS 34 343 614400 1700
60906810 Spheniscine D Sept. 20, 2019, 3:07 a.m. OK Kotlin TESTS 34 343 614400 1700
60906913 Spheniscine D Sept. 20, 2019, 3:11 a.m. OK Kotlin TESTS 34 358 614400 1700
60949437 Tlatoani D Sept. 20, 2019, 8:44 p.m. OK Kotlin TESTS 35 1231 819200 1700
61687230 hzk D Oct. 2, 2019, 4:24 a.m. OK Kotlin TESTS 35 1403 20787200 1700
62428081 og.kostya D Oct. 12, 2019, 2:53 p.m. OK Mono C# TESTS 35 358 9216000 1700
60909783 eki D Sept. 20, 2019, 5:13 a.m. OK Mono C# TESTS 34 483 15667200 1700
61361342 dev8546 D Sept. 27, 2019, 12:15 p.m. OK Mono C# TESTS 35 514 19353600 1700
60890531 Yupiteru D Sept. 19, 2019, 4:56 p.m. OK Mono C# TESTS 34 592 163942400 1700
61350518 artworks D Sept. 27, 2019, 7:53 a.m. OK Mono C# TESTS 35 701 10240000 1700
60886594 hibatibati D Sept. 19, 2019, 4:26 p.m. OK Mono C# TESTS 34 764 17612800 1700
61349395 vjudge4 D Sept. 27, 2019, 7:15 a.m. OK MS C++ TESTS 35 187 9625600 1700
61695372 vjudge1 D Oct. 2, 2019, 6:51 a.m. OK MS C++ TESTS 35 187 11980800 1700
60954866 vjudge1 D Sept. 21, 2019, 1:52 a.m. OK MS C++ TESTS 35 187 12083200 1700
61684974 vjudge2 D Oct. 2, 2019, 3:22 a.m. OK MS C++ TESTS 35 187 16793600 1700
62405200 vjudge5 D Oct. 12, 2019, 8:44 a.m. OK MS C++ TESTS 35 187 26521600 1700
61551318 vjudge3 D Sept. 30, 2019, 12:33 p.m. OK MS C++ TESTS 35 202 12083200 1700
61450042 vjudge4 D Sept. 29, 2019, 1:42 a.m. OK MS C++ TESTS 35 202 12083200 1700
61822312 vjudge2 D Oct. 4, 2019, 2:54 a.m. OK MS C++ TESTS 35 202 12083200 1700
62052928 vjudge5 D Oct. 7, 2019, 10:04 a.m. OK MS C++ TESTS 35 202 12083200 1700
63130512 vjudge4 D Oct. 22, 2019, 2:03 p.m. OK MS C++ TESTS 35 202 12083200 1700
63213012 vjudge5 D Oct. 23, 2019, 4:52 a.m. OK MS C++ 2017 TESTS 35 296 16793600 1700
60959603 IndignantHydra D Sept. 21, 2019, 4:45 a.m. OK MS C++ 2017 TESTS 35 311 12083200 1700
63165073 vjudge3 D Oct. 22, 2019, 3:47 p.m. OK MS C++ 2017 TESTS 35 311 19251200 1700
65563793 vjudge2 D Nov. 23, 2019, 4:49 a.m. OK MS C++ 2017 TESTS 35 312 12083200 1700
60932423 cjhxqdt D Sept. 20, 2019, 2:11 p.m. OK MS C++ 2017 TESTS 35 327 16793600 1700
61369921 lam.le1512 D Sept. 27, 2019, 2:40 p.m. OK MS C++ 2017 TESTS 35 327 20377600 1700
60951085 Sanqer D Sept. 20, 2019, 9:51 p.m. OK MS C++ 2017 TESTS 35 327 28876800 1700
61315139 ainch96 D Sept. 26, 2019, 10:48 a.m. OK MS C++ 2017 TESTS 35 342 40140800 1700
61363332 vjudge3 D Sept. 27, 2019, 12:46 p.m. OK MS C++ 2017 TESTS 35 343 11980800 1700
62974649 vjudge2 D Oct. 20, 2019, 8:09 a.m. OK MS C++ 2017 TESTS 35 358 12083200 1700
65157776 Gaurav1 D Nov. 16, 2019, 10:04 a.m. OK PyPy 2 TESTS 35 529 67174400 1700
60896149 Gaurav1 D Sept. 19, 2019, 6:52 p.m. OK PyPy 2 TESTS 34 530 36352000 1700
60899839 know_no_algo D Sept. 19, 2019, 8:36 p.m. OK PyPy 2 TESTS 34 702 82329600 1700
60882445 Pyar.Mahobat.Dhoka.Hai D Sept. 19, 2019, 4:07 p.m. OK PyPy 2 TESTS 34 717 82329600 1700
61254671 iamprayush D Sept. 25, 2019, 9:37 a.m. OK PyPy 2 TESTS 35 857 53350400 1700
60910595 MVP D Sept. 20, 2019, 5:39 a.m. OK PyPy 2 TESTS 34 1014 63590400 1700
60918536 dohduh D Sept. 20, 2019, 9:28 a.m. OK PyPy 3 TESTS 34 701 60928000 1700
61309714 franckmy D Sept. 26, 2019, 8:47 a.m. OK PyPy 3 TESTS 35 732 60825600 1700
60904276 SetsunaOgiso D Sept. 20, 2019, 1:11 a.m. OK PyPy 3 TESTS 34 779 80384000 1700
61211094 redlcamille D Sept. 24, 2019, 11:30 a.m. OK PyPy 3 TESTS 35 811 78131200 1700
61210935 redlcamille D Sept. 24, 2019, 11:27 a.m. OK PyPy 3 TESTS 35 841 94515200 1700
61337177 kshitij_sodani D Sept. 26, 2019, 5:05 p.m. OK PyPy 3 TESTS 35 842 89190400 1700
60890253 meooow D Sept. 19, 2019, 4:52 p.m. OK PyPy 3 TESTS 34 857 94515200 1700
65040147 lke_python D Nov. 15, 2019, 1:09 p.m. OK PyPy 3 TESTS 35 982 77619200 1700
64480641 vjudge3 D Nov. 7, 2019, 3:48 p.m. OK PyPy 3 TESTS 35 1045 84480000 1700
69668718 roaris D Jan. 28, 2020, 12:17 p.m. OK PyPy 3 TESTS 35 1060 59904000 1700
60891109 nwi D Sept. 19, 2019, 5:05 p.m. OK Python 2 TESTS 34 1169 4505600 1700
61472516 coder_better D Sept. 29, 2019, 12:56 p.m. OK Python 3 TESTS 35 1528 1126400 1700
60903808 takakin D Sept. 20, 2019, 12:40 a.m. OK Python 3 TESTS 34 1591 819200 1700
69688901 akiradeveloper D Jan. 28, 2020, 5:57 p.m. OK Rust TESTS 35 202 12697600 1700
60903702 sansen D Sept. 20, 2019, 12:33 a.m. OK Rust TESTS 34 202 13209600 1700
61547305 000golabi D Sept. 30, 2019, 11 a.m. OK Rust TESTS 35 218 19251200 1700
61363456 ikazuya0201 D Sept. 27, 2019, 12:48 p.m. OK Rust TESTS 35 234 18227200 1700
61027247 ValenKof D Sept. 21, 2019, 4:23 p.m. OK Rust TESTS 35 358 3584000 1700
61238057 0e4ef622 D Sept. 24, 2019, 6:49 p.m. OK Rust TESTS 35 405 105267200 1700

remove filters

Back to search problems