Codeforces Round 745 (Div. 1)

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
1580 Codeforces Round 745 (Div. 1) FINISHED False 7200 104269463 Sept. 30, 2021, 10:15 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 960 ) D Subsequence PROGRAMMING divide and conquer dp trees 2900

B'Alice has an integer sequence a of length n and all elements are different. She will choose a subsequence of a of length m , and defines the value of a subsequence a_{b_1},a_{b_2}, ldots,a_{b_m} as sum_{i = 1}^m (m cdot a_{b_i}) - sum_{i = 1}^m sum_{j = 1}^m f( min(b_i, b_j), max(b_i, b_j)), where f(i, j) denotes min(a_i, a_{i + 1}, ldots, a_j) . Alice wants you to help her to maximize the value of the subsequence she choose. A sequence s is a subsequence of a sequence t if s can be obtained from t by deletion of several (possibly, zero or all) elements. The first line contains two integers n and m ( 1 <= m <= n <= 4000 ). The second line contains n distinct integers a_1, a_2, ldots, a_n ( 1 <= a_i < 2^{31} ). Print the maximal value Alice can get. In the first example, Alice can choose the subsequence [15, 2, 18, 13] , which has the value 4 cdot (15 + 2 + 18 + 13) - (15 + 2 + 2 + 2) - (2 + 2 + 2 + 2) - (2 + 2 + 18 + 12) - (2 + 2 + 12 + 13) = 100 . In the second example, there are a variety of subsequences with value 176 , and one of them is [9, 7, 12, 20, 18] . '...

Tutorials

Codeforces Round #745 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
130358126 hos.lyric D Sept. 30, 2021, 11:25 a.m. OK D TESTS 32 139 79769600 2900
130349534 CXY07 D Sept. 30, 2021, 10:55 a.m. OK GNU C++14 TESTS 32 62 132812800 2900
130420851 xiaoziyao D Oct. 1, 2021, 12:33 a.m. OK GNU C++14 TESTS 33 62 133017600 2900
130428330 S00021 D Oct. 1, 2021, 4:13 a.m. OK GNU C++14 TESTS 33 62 205721600 2900
130431811 zqyyy D Oct. 1, 2021, 5:21 a.m. OK GNU C++14 TESTS 33 77 133120000 2900
130419147 SuperJ6 D Sept. 30, 2021, 11:13 p.m. OK GNU C++14 TESTS 33 78 132915200 2900
130432544 Archer_ D Oct. 1, 2021, 5:34 a.m. OK GNU C++14 TESTS 33 92 132608000 2900
130353694 medium_waxberry D Sept. 30, 2021, 11:09 a.m. OK GNU C++14 TESTS 32 92 132812800 2900
130374951 2005lz D Sept. 30, 2021, 12:57 p.m. OK GNU C++14 TESTS 32 93 132505600 2900
130362238 juju527 D Sept. 30, 2021, 11:41 a.m. OK GNU C++14 TESTS 32 93 132505600 2900
130430643 Eric_hooo D Oct. 1, 2021, 5:01 a.m. OK GNU C++14 TESTS 33 93 133324800 2900
130432168 bosun D Oct. 1, 2021, 5:28 a.m. OK GNU C++17 TESTS 33 62 132505600 2900
130373768 wifiiii D Sept. 30, 2021, 12:48 p.m. OK GNU C++17 TESTS 32 77 132812800 2900
130360095 CuCl2 D Sept. 30, 2021, 11:33 a.m. OK GNU C++17 TESTS 32 77 132812800 2900
130366705 Wap_ D Sept. 30, 2021, noon OK GNU C++17 TESTS 32 78 133120000 2900
130363619 AliShahali1382 D Sept. 30, 2021, 11:47 a.m. OK GNU C++17 TESTS 32 93 4710400 2900
130361242 nick452 D Sept. 30, 2021, 11:37 a.m. OK GNU C++17 TESTS 32 93 4812800 2900
130369151 chemthan D Sept. 30, 2021, 12:10 p.m. OK GNU C++17 TESTS 32 93 65843200 2900
130366254 KoharuHondomachi D Sept. 30, 2021, 11:58 a.m. OK GNU C++17 TESTS 32 93 132812800 2900
130356043 137_345_2814 D Sept. 30, 2021, 11:17 a.m. OK GNU C++17 TESTS 32 93 135680000 2900
130348465 Karry5307_AK_NOI2021 D Sept. 30, 2021, 10:52 a.m. OK GNU C++17 TESTS 32 108 132710400 2900
130368145 Maksim1744 D Sept. 30, 2021, 12:06 p.m. OK GNU C++17 (64) TESTS 32 31 5324800 2900
130357219 fmota D Sept. 30, 2021, 11:21 a.m. OK GNU C++17 (64) TESTS 32 31 5529600 2900
130408667 noimi D Sept. 30, 2021, 6:59 p.m. OK GNU C++17 (64) TESTS 32 31 5632000 2900
130367628 noimi D Sept. 30, 2021, 12:04 p.m. OK GNU C++17 (64) TESTS 32 31 5632000 2900
130409541 noimi D Sept. 30, 2021, 7:12 p.m. OK GNU C++17 (64) TESTS 32 46 4505600 2900
130410699 tute7627 D Sept. 30, 2021, 7:30 p.m. OK GNU C++17 (64) TESTS 32 46 4608000 2900
130366863 mango_lassi D Sept. 30, 2021, 12:01 p.m. OK GNU C++17 (64) TESTS 32 46 4710400 2900
130409485 noimi D Sept. 30, 2021, 7:11 p.m. OK GNU C++17 (64) TESTS 32 46 5017600 2900
130412033 DreamingLeaf D Sept. 30, 2021, 7:54 p.m. OK GNU C++17 (64) TESTS 32 46 5120000 2900
130390593 Lain D Sept. 30, 2021, 3:25 p.m. OK GNU C++17 (64) TESTS 32 46 5324800 2900
130392310 uwi D Sept. 30, 2021, 3:43 p.m. OK Java 11 TESTS 32 358 24883200 2900
130397711 sansen D Sept. 30, 2021, 4:40 p.m. OK Rust TESTS 32 109 4915200 2900

remove filters

Back to search problems