Codeforces Round 625 (Div. 1, based on Technocup 2020 Final Round)

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
1320 Codeforces Round 625 (Div. 1, based on Technocup 2020 Final Round) FINISHED False 7200 154284311 March 1, 2020, 1:15 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16963 ) A Journey Planning PROGRAMMING data structures math sortings

B"Tanya wants to go on a journey across the cities of Berland. There are n cities situated along the main railroad line of Berland, and these cities are numbered from 1 to n . Tanya plans her journey as follows. First of all, she will choose some city c_1 to start her journey. She will visit it, and after that go to some other city c_2 > c_1 , then to some other city c_3 > c_2 , and so on, until she chooses to end her journey in some city c_k > c_{k - 1} . So, the sequence of visited cities [c_1, c_2, ... , c_k] should be strictly increasing. There are some additional constraints on the sequence of cities Tanya visits. Each city i has a beauty value b_i associated with it. If there is only one city in Tanya's journey, these beauty values imply no additional constraints. But if there are multiple cities in the sequence, then for any pair of adjacent cities c_i and c_{i + 1} , the condition c_{i + 1} - c_i = b_{c_{i + 1}} - b_{c_i} must hold. For example, if n = 8 and b = [3, 4, 4, 6, 6, 7, 8, 9] , there are several three possible ways to plan a journey: There are some additional ways to plan a journey that are not listed above. Tanya wants her journey to be as beautiful as possible. The beauty value of the whole journey is the sum of beauty values over all visited cities. Can you help her to choose the optimal plan, that is, to maximize the beauty value of the journey? The first line contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of cities in Berland. The second line contains n integers b_1 , b_2 , ..., b_n ( 1 <= b_i <= 4 cdot 10^5 ), where b_i is the beauty value of the i -th city. Print one integer -- the maximum beauty of a journey Tanya can choose. The optimal journey plan in the first example is c = [2, 4, 5] . The optimal journey plan in the second example is c = [1] . The optimal journey"...

Tutorials

Codeforces Round #625 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
72169838 iica A March 1, 2020, 1:26 p.m. OK D TESTS 129 93 22118400
72190282 hos.lyric A March 1, 2020, 2:25 p.m. OK D TESTS 129 93 36147200
72169738 physics0523 A March 1, 2020, 1:26 p.m. OK GNU C11 TESTS 129 109 12595200
72166871 nantf A March 1, 2020, 1:17 p.m. OK GNU C++11 TESTS 129 31 4812800
72168868 WYXkk A March 1, 2020, 1:24 p.m. OK GNU C++11 TESTS 129 31 4812800
72170910 zhumingyang A March 1, 2020, 1:28 p.m. OK GNU C++11 TESTS 129 31 5632000
72166955 nealchen A March 1, 2020, 1:18 p.m. OK GNU C++11 TESTS 129 31 7270400
72167501 wlzhouzhuan A March 1, 2020, 1:21 p.m. OK GNU C++11 TESTS 129 31 7987200
72169006 luotc_why A March 1, 2020, 1:24 p.m. OK GNU C++11 TESTS 129 31 7987200
72169393 msuwakow A March 1, 2020, 1:25 p.m. OK GNU C++11 TESTS 129 31 8806400
72167410 disposrestfulIy A March 1, 2020, 1:20 p.m. OK GNU C++11 TESTS 129 31 11980800
72168795 froggyzhang A March 1, 2020, 1:24 p.m. OK GNU C++11 TESTS 129 31 12083200
72202677 hs-black A March 1, 2020, 3:14 p.m. OK GNU C++11 TESTS 129 31 13004800
72168033 Linkus A March 1, 2020, 1:22 p.m. OK GNU C++14 TESTS 129 61 16179200
72167752 SidneyMars A March 1, 2020, 1:22 p.m. OK GNU C++14 TESTS 129 62 4812800
72168312 gyulla A March 1, 2020, 1:23 p.m. OK GNU C++14 TESTS 129 62 5632000
72166998 thebes A March 1, 2020, 1:18 p.m. OK GNU C++14 TESTS 129 62 5632000
72167103 kmjp A March 1, 2020, 1:19 p.m. OK GNU C++14 TESTS 129 62 7270400
72166908 wucstdio A March 1, 2020, 1:18 p.m. OK GNU C++14 TESTS 129 62 7987200
72167764 Hoi_koro A March 1, 2020, 1:22 p.m. OK GNU C++14 TESTS 129 62 7987200
72168622 tokitsukaze A March 1, 2020, 1:23 p.m. OK GNU C++14 TESTS 129 62 8294400
72167149 idxcalcal A March 1, 2020, 1:19 p.m. OK GNU C++14 TESTS 129 62 8499200
72166906 shb123 A March 1, 2020, 1:18 p.m. OK GNU C++14 TESTS 129 62 8806400
72166902 interestingLSY A March 1, 2020, 1:18 p.m. OK GNU C++17 TESTS 129 46 9420800
72169564 Qingyu A March 1, 2020, 1:25 p.m. OK GNU C++17 TESTS 129 46 33075200
72167490 JOHNKRAM A March 1, 2020, 1:21 p.m. OK GNU C++17 TESTS 129 61 10342400
72167568 natsugiri A March 1, 2020, 1:21 p.m. OK GNU C++17 TESTS 129 62 1638400
72169304 edenooo A March 1, 2020, 1:25 p.m. OK GNU C++17 TESTS 129 62 4812800
72167721 VodkaInTheJar A March 1, 2020, 1:21 p.m. OK GNU C++17 TESTS 129 62 5632000
72167295 dorijanlendvaj A March 1, 2020, 1:20 p.m. OK GNU C++17 TESTS 129 62 6451200
72168038 lezdzh A March 1, 2020, 1:22 p.m. OK GNU C++17 TESTS 129 62 7168000
72167611 ArshiaDadras A March 1, 2020, 1:21 p.m. OK GNU C++17 TESTS 129 62 7270400
72209394 Vaibhavgolu A March 1, 2020, 5:51 p.m. OK GNU C++17 TESTS 129 62 7577600
72167833 mikit A March 1, 2020, 1:22 p.m. OK Java 11 TESTS 129 234 7168000
72167202 uwi A March 1, 2020, 1:20 p.m. OK Java 11 TESTS 129 280 5120000
72167071 Suzukaze A March 1, 2020, 1:19 p.m. OK Java 11 TESTS 129 280 19456000
72168381 ZeyadKhattab A March 1, 2020, 1:23 p.m. OK Java 11 TESTS 129 311 15257600
72169030 adamjamil A March 1, 2020, 1:24 p.m. OK Java 11 TESTS 129 514 68096000
72214913 sushant_verma A March 1, 2020, 7:50 p.m. OK Java 8 TESTS 129 140 5632000
72171462 DarLam A March 1, 2020, 1:29 p.m. OK Java 8 TESTS 129 155 3174400
72170046 ASoboll A March 1, 2020, 1:26 p.m. OK Java 8 TESTS 129 155 8806400
72168135 BaZ_ A March 1, 2020, 1:22 p.m. OK Java 8 TESTS 129 171 13721600
72169847 saurabhs1206 A March 1, 2020, 1:26 p.m. OK Java 8 TESTS 129 171 15052800
72167196 VArtem A March 1, 2020, 1:20 p.m. OK Java 8 TESTS 129 187 12083200
72167151 SecondThread A March 1, 2020, 1:19 p.m. OK Java 8 TESTS 129 202 11878400
72212382 ijxjdjd A March 1, 2020, 6:52 p.m. OK Java 8 TESTS 129 202 12492800
72168189 iakovlev.zakhar A March 1, 2020, 1:23 p.m. OK Java 8 TESTS 129 217 16998400
72167203 Xylenox A March 1, 2020, 1:20 p.m. OK Java 8 TESTS 129 218 12288000
72169951 yakamoto A March 1, 2020, 1:26 p.m. OK Kotlin TESTS 129 171 5632000
72167133 Tlatoani A March 1, 2020, 1:19 p.m. OK Kotlin TESTS 129 202 18944000
72168216 elizarov A March 1, 2020, 1:23 p.m. OK Kotlin TESTS 129 358 17100800
72167657 keymoon A March 1, 2020, 1:21 p.m. OK Mono C# TESTS 129 124 28364800
72171316 plasma-effect A March 1, 2020, 1:29 p.m. OK Mono C# TESTS 129 249 31948800
72167533 math957963 A March 1, 2020, 1:21 p.m. OK MS C++ TESTS 129 62 8396800
72168358 tarattata1 A March 1, 2020, 1:23 p.m. OK MS C++ TESTS 129 93 9625600
72167669 pichulia A March 1, 2020, 1:21 p.m. OK MS C++ 2017 TESTS 129 139 11264000
72170241 AlexIlin A March 1, 2020, 1:27 p.m. OK MS C++ 2017 TESTS 129 217 9318400
72168186 Friska A March 1, 2020, 1:23 p.m. OK MS C++ 2017 TESTS 129 217 9728000
72171450 BpeMeHHa91_TryDHocTb A March 1, 2020, 1:29 p.m. OK MS C++ 2017 TESTS 129 264 16281600
72168131 bcollet A March 1, 2020, 1:22 p.m. OK PyPy 2 TESTS 129 202 18534400
72169864 SummerDAway A March 1, 2020, 1:26 p.m. OK PyPy 2 TESTS 129 202 19763200
72166978 chielo A March 1, 2020, 1:18 p.m. OK PyPy 3 TESTS 129 296 23552000
72167157 conqueror_of_tourist A March 1, 2020, 1:19 p.m. OK PyPy 3 TESTS 129 311 20787200
72167352 kshitij_sodani A March 1, 2020, 1:20 p.m. OK PyPy 3 TESTS 129 312 24678400
72167273 malylesio A March 1, 2020, 1:20 p.m. OK PyPy 3 TESTS 129 326 24371200
72169350 pineriver A March 1, 2020, 1:25 p.m. OK PyPy 3 TESTS 129 342 23040000
72167704 titia A March 1, 2020, 1:21 p.m. OK PyPy 3 TESTS 129 343 24166400
72183679 syphon A March 1, 2020, 2:01 p.m. OK PyPy 3 TESTS 129 358 27852800
72167116 nwi A March 1, 2020, 1:19 p.m. OK Python 2 TESTS 129 311 11059200
72167526 CHelle A March 1, 2020, 1:21 p.m. OK Python 3 TESTS 129 343 19046400
72214775 _aditya_ A March 1, 2020, 7:47 p.m. OK Python 3 TESTS 129 374 18739200
72168170 sansen A March 1, 2020, 1:23 p.m. OK Rust TESTS 129 77 14233600

remove filters

Back to search problems