Codeforces Round 775 (Div. 1, based on Moscow Open Olympiad in Informatics)

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
1648 Codeforces Round 775 (Div. 1, based on Moscow Open Olympiad in Informatics) FINISHED False 8100 90705863 March 6, 2022, 9:55 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 898 ) D Serious Business PROGRAMMING data structures divide and conquer dp shortest paths

B"Dima is taking part in a show organized by his friend Peter. In this show Dima is required to cross a 3 x n rectangular field. Rows are numbered from 1 to 3 and columns are numbered from 1 to n . The cell in the intersection of the i -th row and the j -th column of the field contains an integer a_{i,j} . Initially Dima's score equals zero, and whenever Dima reaches a cell in the row i and the column j , his score changes by a_{i,j} . Note that the score can become negative. Initially all cells in the first and the third row are marked as available, and all cells in the second row are marked as unavailable. However, Peter offered Dima some help: there are q special offers in the show, the i -th special offer allows Dima to mark cells in the second row between l_i and r_i as available, though Dima's score reduces by k_i whenever he accepts a special offer. Dima is allowed to use as many special offers as he wants, and might mark the same cell as available multiple times. Dima starts his journey in the cell (1, 1) and would like to reach the cell (3, n) . He can move either down to the next row or right to the next column (meaning he could increase the current row or column by 1), thus making n + 1 moves in total, out of which exactly n - 1 would be horizontal and 2 would be vertical. Peter promised Dima to pay him based on his final score, so the sum of all numbers of all visited cells minus the cost of all special offers used. Please help Dima to maximize his final score. The first input line contains two integers n and q ( 1 <= n, q <= 500 ,000 ) -- the number of columns in the field and the number of special offers. The next three lines describe the field, i -th of them contains n integers a_{i1} , a_{i2} , ..., a_{in} ( -10^9 <= a_{ij} <= 10^9) -- the values in the i -th ro"...

Tutorials

Codeforces Round #775 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
148615153 lin7xu D March 6, 2022, 2:11 p.m. OK GNU C++14 TESTS 114 1106 82534400
148654149 zhangjianjuncd D March 7, 2022, 1:52 a.m. OK GNU C++14 TESTS 117 1122 123289600
148652844 zhangjianjuncd D March 7, 2022, 1:05 a.m. OK GNU C++14 TESTS 117 1154 155443200
148653158 zhangjianjuncd D March 7, 2022, 1:16 a.m. OK GNU C++14 TESTS 117 1169 155443200
148653237 L7-56 D March 7, 2022, 1:19 a.m. OK GNU C++14 TESTS 117 1450 112435200
148589242 ljc1301 D March 6, 2022, 11:32 a.m. OK GNU C++14 TESTS 114 1512 84172800
148618216 inclood D March 6, 2022, 2:41 p.m. OK GNU C++14 TESTS 114 1512 90931200
148640976 KrK D March 6, 2022, 7:31 p.m. OK GNU C++14 TESTS 114 1543 105574400
148599616 _SS D March 6, 2022, 12:03 p.m. OK GNU C++14 TESTS 114 1544 215142400
148657424 cyh_toby D March 7, 2022, 3:24 a.m. OK GNU C++14 TESTS 117 1590 235008000
148655494 hotwords D March 7, 2022, 2:33 a.m. OK GNU C++17 TESTS 117 1247 49971200
148655333 hotwords D March 7, 2022, 2:28 a.m. OK GNU C++17 TESTS 117 1325 49971200
148637541 YaoBIG D March 6, 2022, 6:40 p.m. OK GNU C++17 TESTS 114 1419 88883200
148655807 hotwords D March 7, 2022, 2:42 a.m. OK GNU C++17 TESTS 117 1450 49971200
148581774 izone D March 6, 2022, 11:09 a.m. OK GNU C++17 TESTS 114 1497 59596800
148568116 137_345_2814 D March 6, 2022, 10:36 a.m. OK GNU C++17 TESTS 114 1590 130355200
148613175 chasedeath D March 6, 2022, 1:53 p.m. OK GNU C++17 TESTS 114 1606 44748800
148566578 ABitstOCHASTIC D March 6, 2022, 10:32 a.m. OK GNU C++17 TESTS 114 1606 72192000
148653761 FHVirus D March 7, 2022, 1:37 a.m. OK GNU C++17 TESTS 117 1638 53657600
148656981 cy1999 D March 7, 2022, 3:13 a.m. OK GNU C++17 TESTS 117 1684 53657600
148575997 noimi D March 6, 2022, 10:54 a.m. OK GNU C++17 (64) TESTS 114 732 67379200
148606996 tomato_potato D March 6, 2022, 1:06 p.m. OK GNU C++17 (64) TESTS 114 780 65945600
148571497 maroonrk D March 6, 2022, 10:43 a.m. OK GNU C++17 (64) TESTS 114 997 103014400
148610263 torisasami D March 6, 2022, 1:29 p.m. OK GNU C++17 (64) TESTS 114 998 78540800
148586645 kotatsugame D March 6, 2022, 11:23 a.m. OK GNU C++17 (64) TESTS 114 998 102707200
148627079 xyf007 D March 6, 2022, 4:21 p.m. OK GNU C++17 (64) TESTS 114 1029 112230400
148651456 RenaMoe D March 7, 2022, 12:12 a.m. OK GNU C++17 (64) TESTS 114 1076 82227200
148664738 lqx2005 D March 7, 2022, 5:55 a.m. OK GNU C++17 (64) TESTS 117 1138 72704000
148596623 balbit D March 6, 2022, 11:54 a.m. OK GNU C++17 (64) TESTS 114 1309 107520000
148583127 mango_lassi D March 6, 2022, 11:13 a.m. OK GNU C++17 (64) TESTS 114 1325 66969600
148664673 platelet D March 7, 2022, 5:53 a.m. OK GNU C++20 (64) TESTS 117 467 63180800
148585642 yzc2005 D March 6, 2022, 11:20 a.m. OK GNU C++20 (64) TESTS 114 607 90828800
148621553 FormalPowerSeries D March 6, 2022, 3:16 p.m. OK GNU C++20 (64) TESTS 114 670 112332800
148591405 HolyK D March 6, 2022, 11:38 a.m. OK GNU C++20 (64) TESTS 114 795 82739200
148589286 SSerxhs D March 6, 2022, 11:32 a.m. OK GNU C++20 (64) TESTS 114 873 220979200
148645410 kpw29 D March 6, 2022, 8:54 p.m. OK GNU C++20 (64) TESTS 114 888 147865600
148573822 Elegia D March 6, 2022, 10:48 a.m. OK GNU C++20 (64) TESTS 114 920 84889600
148599444 AwakeAnay D March 6, 2022, 12:03 p.m. OK GNU C++20 (64) TESTS 114 1122 76083200
148564585 jiangly D March 6, 2022, 10:29 a.m. OK GNU C++20 (64) TESTS 114 1170 53657600
148580191 ko_osaga D March 6, 2022, 11:05 a.m. OK GNU C++20 (64) TESTS 114 1185 120934400
148643885 mmaxio D March 6, 2022, 8:22 p.m. OK Java 11 TESTS 114 4148 82124800
148650737 Hakiobo D March 6, 2022, 11:41 p.m. OK Kotlin 1.4 TESTS 114 1496 67174400
148650659 Hakiobo D March 6, 2022, 11:38 p.m. OK Kotlin 1.4 TESTS 114 1731 124518400
148650093 Hakiobo D March 6, 2022, 11:16 p.m. OK Kotlin 1.4 TESTS 114 1824 124313600
148605882 Egor D March 6, 2022, 12:59 p.m. OK Rust 2021 TESTS 114 1107 112230400

remove filters

Back to search problems