VK Cup 2018 - Round 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
924 VK Cup 2018 - Round 2 FINISHED False 8100 215619923 March 24, 2018, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3898 ) C Riverside Curio PROGRAMMING data structures dp greedy 1800

B"Arkady decides to observe a river for n consecutive days. The river's water level on each day is equal to some real value. Arkady goes to the riverside each day and makes a mark on the side of the channel at the height of the water level, but if it coincides with a mark made before, no new mark is created. The water does not wash the marks away. Arkady writes down the number of marks strictly above the water level each day, on the i-th day this value is equal to mi. Define di as the number of marks strictly under the water level on the i-th day. You are to find out the minimum possible sum of di over all days. There are no marks on the channel before the first day. The first line contains a single positive integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of days. The second line contains n space-separated integers m1, xe2 x80 x89m2, xe2 x80 x89..., xe2 x80 x89mn (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89mi xe2 x80 x89< xe2 x80 x89i) -- the number of marks strictly above the water on each day. Output one single integer -- the minimum possible sum of the number of marks strictly below the water level among all days. In the first example, the following figure shows an optimal case. Note that on day 3, a new mark should be created because if not, there cannot be 3 marks above water on day 4. The total number of marks underwater is 0 xe2 x80 x89+ xe2 x80 x890 xe2 x80 x89+ xe2 x80 x892 xe2 x80 x89+ xe2 x80 x890 xe2 x80 x89+ xe2 x80 x893 xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89= xe2 x80 x896. In the second example, the following figure shows an optimal case. "...

Tutorials

VK Cup 2018 Round 2 and Codeforces Round #472 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
36587166 353cerega SYury C March 24, 2018, 4:10 p.m. OK FPC TESTS 42 46 9011200 1800
36593876 nightcrowler vassabbi C March 24, 2018, 5:02 p.m. OK FPC TESTS 42 46 15155200 1800
38914130 JohnByro C June 3, 2018, 8:05 a.m. OK GNU C TESTS 42 31 3686400 1800
36899092 ilovenwd C April 3, 2018, 10:27 a.m. OK GNU C TESTS 42 46 4096000 1800
36761895 dengyixuan C March 31, 2018, 2:36 a.m. OK GNU C++ TESTS 42 30 5120000 1800
41550433 vjudge1 C Aug. 13, 2018, 7:57 a.m. OK GNU C++ TESTS 42 31 614400 1800
38632266 robinliu C May 26, 2018, 11:40 a.m. OK GNU C++ TESTS 42 31 819200 1800
40978342 ReaLNero1 C July 30, 2018, 4:35 p.m. OK GNU C++ TESTS 42 31 819200 1800
40495171 Z1154990071 C July 18, 2018, 1:45 a.m. OK GNU C++ TESTS 42 31 1638400 1800
37917648 jiyutian C May 6, 2018, 3:11 a.m. OK GNU C++ TESTS 42 31 4096000 1800
36625719 Creed C March 25, 2018, 7:11 p.m. OK GNU C++ TESTS 42 31 4300800 1800
36613129 skywalkert C March 25, 2018, 10:34 a.m. OK GNU C++ TESTS 42 31 4300800 1800
36581282 totsamyzed wxowxo1996 C March 24, 2018, 3:47 p.m. OK GNU C++ TESTS 42 31 4812800 1800
37926281 vjudge5 C May 6, 2018, 10:44 a.m. OK GNU C++ TESTS 42 31 5120000 1800
38914226 JohnByro C June 3, 2018, 8:09 a.m. OK GNU C11 TESTS 42 31 3788800 1800
37143961 827843896 C April 10, 2018, 12:24 p.m. OK GNU C11 TESTS 42 31 4096000 1800
48404206 CrazyTeaMajor C Jan. 15, 2019, 1:47 a.m. OK GNU C++11 TESTS 42 31 614400 1800
38687496 pipialvin C May 28, 2018, 7:44 a.m. OK GNU C++11 TESTS 42 31 716800 1800
69052864 Lenstar C Jan. 18, 2020, 1:21 p.m. OK GNU C++11 TESTS 42 31 819200 1800
63129603 qxforever C Oct. 22, 2019, 1:48 p.m. OK GNU C++11 TESTS 42 31 819200 1800
59944314 foreverlasting C Sept. 3, 2019, 12:30 p.m. OK GNU C++11 TESTS 42 31 819200 1800
58557615 pufanyi C Aug. 11, 2019, 3:23 a.m. OK GNU C++11 TESTS 42 31 819200 1800
48408863 Clao_015 C Jan. 15, 2019, 6:24 a.m. OK GNU C++11 TESTS 42 31 819200 1800
48404990 vjudge2 C Jan. 15, 2019, 2:38 a.m. OK GNU C++11 TESTS 42 31 819200 1800
69052887 vjudge3 C Jan. 18, 2020, 1:21 p.m. OK GNU C++11 TESTS 42 31 819200 1800
69072889 vjudge3 C Jan. 19, 2020, midnight OK GNU C++11 TESTS 42 31 819200 1800
69715218 usernameson C Jan. 29, 2020, 8:45 a.m. OK GNU C++14 TESTS 42 31 819200 1800
61112728 Helman C Sept. 23, 2019, 11:51 a.m. OK GNU C++14 TESTS 42 31 819200 1800
36588856 Dilana VeryLonelyRaccoon C March 24, 2018, 4:20 p.m. OK GNU C++14 TESTS 42 31 4096000 1800
36589367 JewRaper gbarto C March 24, 2018, 4:23 p.m. OK GNU C++14 TESTS 42 31 4198400 1800
36585771 ztk ballon C March 24, 2018, 4:03 p.m. OK GNU C++14 TESTS 42 31 11776000 1800
60318123 alurquiza C Sept. 9, 2019, 6:55 p.m. OK GNU C++14 TESTS 42 46 819200 1800
62606543 holmium01 C Oct. 15, 2019, 7:59 a.m. OK GNU C++14 TESTS 42 46 819200 1800
56516863 shivamsalil C July 4, 2019, 1:07 p.m. OK GNU C++14 TESTS 42 46 819200 1800
58317147 Theofratus C Aug. 5, 2019, 3:38 a.m. OK GNU C++14 TESTS 42 46 819200 1800
60462295 smasHR C Sept. 12, 2019, 9:34 p.m. OK GNU C++14 TESTS 42 46 819200 1800
41735793 ladyjy C Aug. 18, 2018, 2:19 a.m. OK GNU C++17 TESTS 42 46 819200 1800
69814506 pzc2004 C Jan. 30, 2020, 5:40 a.m. OK GNU C++17 TESTS 42 46 819200 1800
67986389 m.hasan01 C Dec. 30, 2019, 11:12 p.m. OK GNU C++17 TESTS 42 46 819200 1800
65758444 z3r0dmg C Nov. 26, 2019, 2:52 p.m. OK GNU C++17 TESTS 42 46 819200 1800
65502967 sammithkanur C Nov. 21, 2019, 8:05 p.m. OK GNU C++17 TESTS 42 46 819200 1800
59402539 Nakagawa.Kanon C Aug. 24, 2019, 12:42 p.m. OK GNU C++17 TESTS 42 46 819200 1800
55108635 cxsy C June 5, 2019, 4:56 a.m. OK GNU C++17 TESTS 42 46 819200 1800
54469663 KoalaMuch C May 22, 2019, 4:14 a.m. OK GNU C++17 TESTS 42 46 819200 1800
53744573 lienquanpc C May 4, 2019, 3:53 p.m. OK GNU C++17 TESTS 42 46 819200 1800
41670470 Hope_amasser C Aug. 17, 2018, 4:36 a.m. OK GNU C++17 TESTS 42 46 819200 1800
67181874 bleh0.5 C Dec. 19, 2019, 12:22 a.m. OK Java 11 TESTS 42 218 0 1800
67446804 AmirRZ C Dec. 22, 2019, 11:02 p.m. OK Java 11 TESTS 42 312 0 1800
68325927 chojh1222 C Jan. 6, 2020, 4:52 p.m. OK Java 8 TESTS 42 109 0 1800
61782613 Shady51 C Oct. 3, 2019, 1:37 p.m. OK Java 8 TESTS 42 124 0 1800
50690709 ramez C March 2, 2019, 3:33 p.m. OK Java 8 TESTS 42 124 0 1800
50334978 wadissimo C Feb. 22, 2019, 8:23 p.m. OK Java 8 TESTS 42 124 0 1800
36632892 poikniok C March 26, 2018, 6:09 a.m. OK Java 8 TESTS 42 124 20684800 1800
63090966 IDzekh C Oct. 21, 2019, 6:25 p.m. OK Java 8 TESTS 42 139 0 1800
44655737 KulikAlex C Oct. 21, 2018, 12:58 p.m. OK Java 8 TESTS 42 139 0 1800
36588007 iakovlev.zakhar Pennyroyal_Tea C March 24, 2018, 4:14 p.m. OK Java 8 TESTS 42 140 20787200 1800
36582768 tmwilliamlin168 RockyB C March 24, 2018, 3:52 p.m. OK Java 8 TESTS 42 155 20684800 1800
37870027 alibaba C May 3, 2018, 6:44 p.m. OK Java 8 TESTS 42 155 20787200 1800
37644575 DCNick3 C April 26, 2018, 6:05 p.m. OK Mono C# TESTS 42 62 19660800 1800
36601551 Kirundel C March 24, 2018, 7:05 p.m. OK Mono C# TESTS 42 77 19558400 1800
41544508 wangjp C Aug. 13, 2018, 3:13 a.m. OK MS C++ TESTS 42 31 819200 1800
36880111 550319035 C April 2, 2018, 1:48 p.m. OK MS C++ TESTS 42 31 4300800 1800
36584190 WH6 whfym C March 24, 2018, 3:57 p.m. OK MS C++ TESTS 42 31 4403200 1800
36586952 Tira miagkov C March 24, 2018, 4:09 p.m. OK MS C++ TESTS 42 31 4710400 1800
36590268 Perforator C March 24, 2018, 4:31 p.m. OK MS C++ TESTS 42 31 4710400 1800
36590901 noxwell Taube C March 24, 2018, 4:38 p.m. OK MS C++ TESTS 42 31 5120000 1800
39192302 vjudge2 C June 12, 2018, 1:09 p.m. OK MS C++ TESTS 42 46 409600 1800
60992112 vjudge3 C Sept. 21, 2019, 8:33 a.m. OK MS C++ TESTS 42 46 819200 1800
41544518 vjudge1 C Aug. 13, 2018, 3:14 a.m. OK MS C++ TESTS 42 46 819200 1800
40835949 scorpiowf C July 27, 2018, 7:36 a.m. OK MS C++ TESTS 42 46 921600 1800
60211948 Nikolai16 C Sept. 7, 2019, 10:24 a.m. OK MS C++ 2017 TESTS 42 93 1638400 1800
55094937 index_ C June 4, 2019, 4:36 p.m. OK MS C++ 2017 TESTS 42 93 4710400 1800
60208708 nik1998 C Sept. 7, 2019, 9:13 a.m. OK MS C++ 2017 TESTS 42 93 82022400 1800
36898392 figure0907 C April 3, 2018, 10:01 a.m. OK PyPy 3 TESTS 42 171 32460800 1800
36889466 nealzane C April 2, 2018, 9:42 p.m. OK Python 2 TESTS 42 233 11366400 1800
40650171 belkka C July 22, 2018, 8:21 p.m. OK Python 3 TESTS 42 218 7372800 1800
52717172 vjudge3 C April 13, 2019, 5:53 p.m. OK Python 3 TESTS 42 248 7680000 1800
45846164 mtarunsai1999 C Nov. 16, 2018, 7:40 p.m. OK Python 3 TESTS 42 265 7270400 1800
42142273 Mk_Python_v1 C Aug. 27, 2018, 6:24 a.m. OK Python 3 TESTS 42 280 7372800 1800
36592502 KoMiI TheWebKot C March 24, 2018, 4:52 p.m. OK Python 3 TESTS 42 280 14848000 1800
37142687 farazradfar C April 10, 2018, 11:35 a.m. OK Python 3 TESTS 42 296 13004800 1800
37142207 smhh22 C April 10, 2018, 11:16 a.m. OK Python 3 TESTS 42 311 13004800 1800
37142409 NimaRMZ C April 10, 2018, 11:25 a.m. OK Python 3 TESTS 42 311 14848000 1800
37142238 HeydarBABA C April 10, 2018, 11:17 a.m. OK Python 3 TESTS 42 311 14848000 1800
37143335 Jalilvand.mJ C April 10, 2018, 12:02 p.m. OK Python 3 TESTS 42 326 14131200 1800

remove filters

Back to search problems