Educational Codeforces Round 106 (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
1499 Educational Codeforces Round 106 (Rated for Div. 2) FINISHED False 7200 115744199 March 18, 2021, 2:50 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12712 ) C Minimum Grid Path PROGRAMMING brute force data structures dp greedy

B"Let's say you are standing on the XY -plane at point (0, 0) and you want to reach point (n, n) . You can move only in two directions: In other words, your path will have the following structure: You don't like to change your direction too much, so you will make no more than n - 1 direction changes. As a result, your path will be a polygonal chain from (0, 0) to (n, n) , consisting of at most n line segments where each segment has positive integer length and vertical and horizontal segments alternate. Not all paths are equal. You have n integers c_1, c_2, ... , c_n where c_i is the cost of the i -th segment. Using these costs we can define the cost of the path as the sum of lengths of the segments of this path multiplied by their cost, i. e. if the path consists of k segments ( k <= n ), then the cost of the path is equal to sum limits_{i=1}^{k}{c_i cdot length_i} (segments are numbered from 1 to k in the order they are in the path). Find the path of the minimum cost and print its cost. The first line contains the single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains the single integer n ( 2 <= n <= 10^5 ). The second line of each test case contains n integers c_1, c_2, ... , c_n ( 1 <= c_i <= 10^9 ) -- the costs of each segment. It's guaranteed that the total sum of n doesn't exceed 10^5 . For each test case, print the minimum possible cost of the path from (0, 0) to (n, n) consisting of at most n alternating segments. In the first test case, to reach (2, 2) you need to make at least one turn, so your path will consist of exactly 2 segments: one horizontal of length 2 and one vertical of length 2 . The cost of the path will be equal to 2 cdot c_1 + 2 cdot c_2 = 26 + 176 = 202 . In the second test case, on"...

Tutorials

Educational Codeforces Round 106 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
110391793 ruban C March 18, 2021, 5:38 p.m. OK Delphi TESTS 7 62 49049600
110388371 Xinull C March 18, 2021, 5:04 p.m. OK GNU C11 TESTS 7 31 819200
110388641 Xinull C March 18, 2021, 5:06 p.m. OK GNU C11 TESTS 7 46 819200
110387961 Xinull C March 18, 2021, 5:01 p.m. OK GNU C11 TESTS 7 46 819200
110410340 future17 C March 19, 2021, 2:24 a.m. OK GNU C++11 TESTS 7 15 921600
110381342 immortaldeadpool C March 18, 2021, 4:38 p.m. OK GNU C++11 TESTS 7 30 819200
110408320 lanChe C March 19, 2021, 1 a.m. OK GNU C++11 TESTS 7 30 819200
110408023 ___red___ C March 19, 2021, 12:46 a.m. OK GNU C++11 TESTS 7 30 2560000
110378376 ChouHuazibu C March 18, 2021, 4:29 p.m. OK GNU C++11 TESTS 7 30 3174400
110407534 lick_ C March 19, 2021, 12:20 a.m. OK GNU C++11 TESTS 7 31 409600
110407538 hnust_zhouzisheng C March 19, 2021, 12:21 a.m. OK GNU C++11 TESTS 7 31 409600
110383978 I_do_not_know C March 18, 2021, 4:45 p.m. OK GNU C++11 TESTS 7 31 614400
110384104 yateng817 C March 18, 2021, 4:45 p.m. OK GNU C++11 TESTS 7 31 819200
110409230 ILLEGAL_ORZ C March 19, 2021, 1:44 a.m. OK GNU C++11 TESTS 7 31 819200
110413612 L2K2 C March 19, 2021, 3:59 a.m. OK GNU C++14 TESTS 7 31 409600
110409476 notorious_kid C March 19, 2021, 1:54 a.m. OK GNU C++14 TESTS 7 31 819200
110397211 _vibranium C March 18, 2021, 6:55 p.m. OK GNU C++14 TESTS 7 31 819200
110396968 ViditBhardwaj C March 18, 2021, 6:51 p.m. OK GNU C++14 TESTS 7 31 819200
110391047 Zombiehead C March 18, 2021, 5:29 p.m. OK GNU C++14 TESTS 7 31 819200
110412819 tanmaymodi C March 19, 2021, 3:36 a.m. OK GNU C++14 TESTS 7 31 819200
110387537 mangat_angad C March 18, 2021, 4:58 p.m. OK GNU C++14 TESTS 7 31 819200
110379398 code1194 C March 18, 2021, 4:32 p.m. OK GNU C++14 TESTS 7 31 819200
110389326 WAphobia C March 18, 2021, 5:12 p.m. OK GNU C++14 TESTS 7 31 819200
110391892 Aditya_278 C March 18, 2021, 5:39 p.m. OK GNU C++14 TESTS 7 31 2969600
110406489 rishi C March 18, 2021, 11:24 p.m. OK GNU C++17 TESTS 7 31 0
110400624 null_ref C March 18, 2021, 7:59 p.m. OK GNU C++17 TESTS 7 31 409600
110406535 jzdx C March 18, 2021, 11:27 p.m. OK GNU C++17 TESTS 7 31 409600
110414011 tej_1441 C March 19, 2021, 4:09 a.m. OK GNU C++17 TESTS 7 31 819200
110408909 Abandon7 C March 19, 2021, 1:29 a.m. OK GNU C++17 TESTS 7 31 819200
110402830 vdmedragon C March 18, 2021, 8:53 p.m. OK GNU C++17 TESTS 7 31 819200
110394373 hardShoft C March 18, 2021, 6:13 p.m. OK GNU C++17 TESTS 7 31 819200
110391860 Chu_ C March 18, 2021, 5:39 p.m. OK GNU C++17 TESTS 7 31 819200
110381936 lazy_and_slow C March 18, 2021, 4:39 p.m. OK GNU C++17 TESTS 7 31 819200
110412257 nsuPiece C March 19, 2021, 3:20 a.m. OK GNU C++17 TESTS 7 31 819200
110415415 it_aint_me C March 19, 2021, 4:40 a.m. OK GNU C++17 (64) TESTS 7 30 409600
110413178 inszva C March 19, 2021, 3:47 a.m. OK GNU C++17 (64) TESTS 7 30 819200
110407789 Ayalla C March 19, 2021, 12:33 a.m. OK GNU C++17 (64) TESTS 7 30 819200
110396319 destroyer07 C March 18, 2021, 6:41 p.m. OK GNU C++17 (64) TESTS 7 30 819200
110382271 Tanzeel C March 18, 2021, 4:40 p.m. OK GNU C++17 (64) TESTS 7 30 819200
110405633 viniciusth C March 18, 2021, 10:35 p.m. OK GNU C++17 (64) TESTS 7 30 1638400
110413474 against_the_current C March 19, 2021, 3:56 a.m. OK GNU C++17 (64) TESTS 7 30 2457600
110382080 Heltion C March 18, 2021, 4:40 p.m. OK GNU C++17 (64) TESTS 7 31 0
110384816 Evang C March 18, 2021, 4:47 p.m. OK GNU C++17 (64) TESTS 7 31 0
110406231 BiIIy C March 18, 2021, 11:11 p.m. OK GNU C++17 (64) TESTS 7 31 409600
110386789 flyasdfvcxz C March 18, 2021, 4:54 p.m. OK Go TESTS 7 46 409600
110389082 0x3F C March 18, 2021, 5:10 p.m. OK Go TESTS 7 109 819200
110378639 krishnam_rathi C March 18, 2021, 4:30 p.m. OK Java 11 TESTS 7 187 0
110378658 Pursuit_of_Accepted C March 18, 2021, 4:30 p.m. OK Java 11 TESTS 7 187 0
110412860 iamavalon C March 19, 2021, 3:38 a.m. OK Java 11 TESTS 7 187 0
110402799 Abhi_Valani C March 18, 2021, 8:52 p.m. OK Java 11 TESTS 7 187 0
110380001 sarthaksavasil C March 18, 2021, 4:34 p.m. OK Java 11 TESTS 7 187 0
110418389 JigarNainuji C March 19, 2021, 5:40 a.m. OK Java 11 TESTS 7 202 0
110419263 tushar_patil C March 19, 2021, 5:51 a.m. OK Java 11 TESTS 7 202 0
110418478 Axel.blaze- C March 19, 2021, 5:41 a.m. OK Java 11 TESTS 7 202 0
110406762 Siddharth2020 C March 18, 2021, 11:40 p.m. OK Java 11 TESTS 7 202 0
110399687 Akshat1409 C March 18, 2021, 7:41 p.m. OK Java 11 TESTS 7 202 0
110403530 mkosm C March 18, 2021, 9:13 p.m. OK Java 8 TESTS 7 108 0
110407434 BogoSortIsBest C March 19, 2021, 12:15 a.m. OK Java 8 TESTS 7 124 0
110398704 RonWonWon C March 18, 2021, 7:22 p.m. OK Java 8 TESTS 7 139 0
110395540 guru1603 C March 18, 2021, 6:30 p.m. OK Java 8 TESTS 7 139 0
110379893 Khater C March 18, 2021, 4:34 p.m. OK Java 8 TESTS 7 140 0
110394942 VishuTomar C March 18, 2021, 6:21 p.m. OK Java 8 TESTS 7 140 0
110400474 Dstoical C March 18, 2021, 7:56 p.m. OK Java 8 TESTS 7 155 0
110385371 sharma_satya C March 18, 2021, 4:48 p.m. OK Java 8 TESTS 7 155 5017600
110395492 Charigardash C March 18, 2021, 6:29 p.m. OK Java 8 TESTS 7 156 0
110387918 Zahid_Hasan_Sahin C March 18, 2021, 5:01 p.m. OK Java 8 TESTS 7 265 0
110392022 fork27 C March 18, 2021, 5:41 p.m. OK JavaScript TESTS 7 78 15257600
110379289 ostroumov C March 18, 2021, 4:32 p.m. OK Kotlin TESTS 7 124 0
110398775 areniis C March 18, 2021, 7:24 p.m. OK Kotlin TESTS 7 171 204800
110395463 a-arsenij C March 18, 2021, 6:29 p.m. OK Kotlin TESTS 7 296 102400
110395525 a-arsenij C March 18, 2021, 6:30 p.m. OK Kotlin TESTS 7 311 102400
110395260 a-arsenij C March 18, 2021, 6:26 p.m. OK Kotlin TESTS 7 358 102400
110382108 svr58 C March 18, 2021, 4:40 p.m. OK MS C++ TESTS 7 93 409600
110378584 HyperTheory C March 18, 2021, 4:30 p.m. OK MS C++ 2017 TESTS 7 93 0
110384395 charan_m_r C March 18, 2021, 4:46 p.m. OK MS C++ 2017 TESTS 7 108 819200
110388226 say_hi C March 18, 2021, 5:03 p.m. OK MS C++ 2017 TESTS 7 108 1024000
110418125 pgggggggggh C March 19, 2021, 5:36 a.m. OK MS C++ 2017 TESTS 7 109 3276800
110417949 pgggggggggh C March 19, 2021, 5:33 a.m. OK MS C++ 2017 TESTS 7 109 3584000
110381557 kurs C March 18, 2021, 4:38 p.m. OK MS C++ 2017 TESTS 7 109 4812800
110396432 Friska C March 18, 2021, 6:43 p.m. OK MS C++ 2017 TESTS 7 109 6860800
110401748 ustaritz C March 18, 2021, 8:26 p.m. OK MS C++ 2017 TESTS 7 124 409600
110394138 svr2kos2 C March 18, 2021, 6:10 p.m. OK MS C++ 2017 TESTS 7 124 1843200
110390735 jokebird C March 18, 2021, 5:26 p.m. OK MS C++ 2017 TESTS 7 124 1945600
110404116 addabis C March 18, 2021, 9:33 p.m. OK .NET Core C# TESTS 7 108 10444800
110387755 sakapon C March 18, 2021, 4:59 p.m. OK .NET Core C# TESTS 7 124 10854400
110378444 tennisru C March 18, 2021, 4:30 p.m. OK Node.js TESTS 7 124 14233600
110382703 rsFalse C March 18, 2021, 4:42 p.m. OK Perl TESTS 7 108 13209600
110378715 maciaas C March 18, 2021, 4:30 p.m. OK PyPy 2 TESTS 7 140 8294400
110396242 vvedant99 C March 18, 2021, 6:40 p.m. OK PyPy 3 TESTS 7 155 8396800
110399014 deepanshu_pali C March 18, 2021, 7:28 p.m. OK PyPy 3 TESTS 7 155 10035200
110395760 nitish420 C March 18, 2021, 6:33 p.m. OK PyPy 3 TESTS 7 171 9318400
110418069 hxu10 C March 19, 2021, 5:35 a.m. OK PyPy 3 TESTS 7 186 10649600
110409403 hxu10 C March 19, 2021, 1:52 a.m. OK PyPy 3 TESTS 7 186 10649600
110404148 chandra17shreeji C March 18, 2021, 9:34 p.m. OK PyPy 3 TESTS 7 202 10547200
110399586 bjy C March 18, 2021, 7:39 p.m. OK PyPy 3 TESTS 7 202 10649600
110378947 Liberator187 C March 18, 2021, 4:31 p.m. OK PyPy 3 TESTS 7 202 12390400
110402403 phantomxxx C March 18, 2021, 8:41 p.m. OK PyPy 3 TESTS 7 217 10649600
110381921 bhy_ahmed C March 18, 2021, 4:39 p.m. OK PyPy 3 TESTS 7 217 14028800
110383376 dara_tovstyga C March 18, 2021, 4:43 p.m. OK Python 3 TESTS 7 186 8499200
110386807 Minim C March 18, 2021, 4:54 p.m. OK Python 3 TESTS 7 202 8192000
110411097 hogrider C March 19, 2021, 2:46 a.m. OK Python 3 TESTS 7 202 8396800
110381472 tusharjain0022 C March 18, 2021, 4:38 p.m. OK Python 3 TESTS 7 202 8499200
110388588 sushmanth.dampur8780 C March 18, 2021, 5:06 p.m. OK Python 3 TESTS 7 202 8908800
110389639 arpan.parikh C March 18, 2021, 5:14 p.m. OK Python 3 TESTS 7 202 9216000
110394997 giant-mammoth C March 18, 2021, 6:22 p.m. OK Python 3 TESTS 7 202 10035200
110382564 zapdospops C March 18, 2021, 4:41 p.m. OK Python 3 TESTS 7 218 8396800
110380555 fork52 C March 18, 2021, 4:36 p.m. OK Python 3 TESTS 7 233 8396800
110416054 parth_sak12 C March 19, 2021, 4:52 a.m. OK Python 3 TESTS 7 233 8499200
110405987 Russell_Emerine C March 18, 2021, 10:55 p.m. OK Rust TESTS 7 31 6348800
110384453 uesugi C March 18, 2021, 4:46 p.m. OK Rust TESTS 7 46 1843200
110390912 chicken1925 C March 18, 2021, 5:27 p.m. OK Rust TESTS 7 124 7987200

remove filters

Back to search problems