Codeforces Round 371 (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
713 Codeforces Round 371 (Div. 1) FINISHED False 7200 258038699 Sept. 13, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5424 ) C Sonya and Problem Wihtout a Legend PROGRAMMING dp sortings 2400

B'Sonya was unable to think of a story for this problem, so here comes the formal description. You are given the array containing n positive integers. At one turn you can pick any element and increase or decrease it by 1. The goal is the make the array strictly increasing by making the minimum possible number of operations. You are allowed to change elements in any way, they can become negative or equal to 0. The first line of the input contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893000) -- the length of the array. Next line contains n integer ai (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). Print the minimum number of operation required to make the array strictly increasing. In the first sample, the array is going to look as follows: 2 3 5 6 7 9 11 |2 xe2 x80 x89- xe2 x80 x892| xe2 x80 x89+ xe2 x80 x89|1 xe2 x80 x89- xe2 x80 x893| xe2 x80 x89+ xe2 x80 x89|5 xe2 x80 x89- xe2 x80 x895| xe2 x80 x89+ xe2 x80 x89|11 xe2 x80 x89- xe2 x80 x896| xe2 x80 x89+ xe2 x80 x89|5 xe2 x80 x89- xe2 x80 x897| xe2 x80 x89+ xe2 x80 x89|9 xe2 x80 x89- xe2 x80 x899| xe2 x80 x89+ xe2 x80 x89|11 xe2 x80 x89- xe2 x80 x8911| xe2 x80 x89= xe2 x80 x899 And for the second sample: 1 2 3 4 5 |5 xe2 x80 x89- xe2 x80 x891| xe2 x80 x89+ xe2 x80 x89|4 xe2 x80 x89- xe2 x80 x892| xe2 x80 x89+ xe2 x80 x89|3 xe2 x80 x89- xe2 x80 x893| xe2 x80 x89+ xe2 x80 x89|2 xe2 x80 x89- xe2 x80 x894| xe2 x80 x89+ xe2 x80 x89|1 xe2 x80 x89- xe2 x80 x895| xe2 x80 x89= xe2 x80 x8912 '...

Tutorials

Codeforces Round #371 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
20583306 Gassa C Sept. 13, 2016, 5:14 p.m. OK D TESTS 57 124 4198400 2400
21907228 WalkingDeade C Oct. 31, 2016, 9 a.m. OK FPC TESTS 57 15 0 2400
20585800 totsamyzed C Sept. 13, 2016, 5:25 p.m. OK FPC TESTS 57 15 18329600 2400
38009734 __ShaW C May 8, 2018, 2:18 a.m. OK FPC TESTS 57 31 3481600 2400
21907812 WalkingDeade C Oct. 31, 2016, 9:24 a.m. OK FPC TESTS 57 46 204800 2400
42114836 chaorenhaha C Aug. 26, 2018, 8:53 a.m. OK FPC TESTS 57 77 73830400 2400
42114820 chaorenhaha C Aug. 26, 2018, 8:52 a.m. OK FPC TESTS 57 78 72294400 2400
21984374 myx12345 C Nov. 2, 2016, 7:26 a.m. OK FPC TESTS 57 170 144384000 2400
27314578 MB1151 C May 24, 2017, 5:44 a.m. OK GNU C TESTS 57 15 0 2400
21802692 rainboy C Oct. 26, 2016, 5:40 p.m. OK GNU C TESTS 57 46 102400 2400
31978494 vjudge5 C Nov. 2, 2017, 11:53 a.m. OK GNU C++ TESTS 57 15 0 2400
23002341 vjudge2 C Dec. 15, 2016, 9:44 a.m. OK GNU C++ TESTS 57 15 0 2400
22853069 abhi1agarwal C Dec. 10, 2016, 10:50 a.m. OK GNU C++ TESTS 57 15 0 2400
22853044 abhi1agarwal C Dec. 10, 2016, 10:49 a.m. OK GNU C++ TESTS 57 15 0 2400
20836340 zqh_wz C Sept. 23, 2016, 11:57 a.m. OK GNU C++ TESTS 57 15 0 2400
20796442 Chenhongkan C Sept. 21, 2016, 1:50 p.m. OK GNU C++ TESTS 57 15 0 2400
20670553 fariseic C Sept. 17, 2016, 12:26 a.m. OK GNU C++ TESTS 57 15 0 2400
20808480 LoveYayoi C Sept. 22, 2016, 1:11 a.m. OK GNU C++ TESTS 57 15 102400 2400
20655188 TillEnd C Sept. 16, 2016, 7:54 a.m. OK GNU C++ TESTS 57 15 409600 2400
25868195 infinity37 C March 28, 2017, 8:07 a.m. OK GNU C++ TESTS 57 15 2048000 2400
24553859 magieNoire C Feb. 9, 2017, 4:38 p.m. OK GNU C11 TESTS 57 280 1945600 2400
22174137 bblss135 C Nov. 12, 2016, 8:08 a.m. OK GNU C++11 TESTS 57 15 0 2400
22044081 Mikester C Nov. 4, 2016, 9:15 p.m. OK GNU C++11 TESTS 57 15 0 2400
22013439 goodthingstaketime_._ C Nov. 3, 2016, 1:26 p.m. OK GNU C++11 TESTS 57 15 0 2400
20676233 DatTenNayChoNgan C Sept. 17, 2016, 8:19 a.m. OK GNU C++11 TESTS 57 15 0 2400
20584729 TeaPot C Sept. 13, 2016, 5:20 p.m. OK GNU C++11 TESTS 57 15 0 2400
27459104 memeset C May 31, 2017, 4:37 a.m. OK GNU C++11 TESTS 57 15 0 2400
30225733 Dirge. C Sept. 9, 2017, 12:43 p.m. OK GNU C++11 TESTS 57 15 102400 2400
21217758 vignesh97 C Oct. 5, 2016, 5:26 p.m. OK GNU C++11 TESTS 57 15 102400 2400
20818255 hnu13zph C Sept. 22, 2016, 1:33 p.m. OK GNU C++11 TESTS 57 15 102400 2400
30771676 Mitsuhaw C Sept. 27, 2017, 8:36 a.m. OK GNU C++11 TESTS 57 15 102400 2400
22035510 TheLeader C Nov. 4, 2016, 1:43 p.m. OK GNU C++14 TESTS 57 15 0 2400
20623607 ko_osaga C Sept. 14, 2016, 5:14 p.m. OK GNU C++14 TESTS 57 15 0 2400
20606314 ko_osaga C Sept. 14, 2016, 5:42 a.m. OK GNU C++14 TESTS 57 15 102400 2400
32521520 backlight0417 C Nov. 21, 2017, 10:02 a.m. OK GNU C++14 TESTS 57 15 102400 2400
27574227 send_nodes C June 5, 2017, 2:27 a.m. OK GNU C++14 TESTS 57 15 102400 2400
27006038 kyleliu C May 11, 2017, 4:27 a.m. OK GNU C++14 TESTS 57 15 102400 2400
22179055 repeating C Nov. 12, 2016, 1:52 p.m. OK GNU C++14 TESTS 57 15 102400 2400
21860445 raj-prince C Oct. 28, 2016, 11:04 p.m. OK GNU C++14 TESTS 57 15 102400 2400
20654424 haleyk100198 C Sept. 16, 2016, 7:09 a.m. OK GNU C++14 TESTS 57 15 102400 2400
20634840 ko_osaga C Sept. 15, 2016, 8:08 a.m. OK GNU C++14 TESTS 57 15 102400 2400
36065048 siiri C March 8, 2018, 8:45 a.m. OK GNU C++17 TESTS 57 15 10342400 2400
68124716 popovicirobert C Jan. 3, 2020, 2:43 p.m. OK GNU C++17 TESTS 57 30 102400 2400
53560440 vjudge3 C April 30, 2019, 9:10 a.m. OK GNU C++17 TESTS 57 30 102400 2400
51097242 Celesta C March 9, 2019, 5:05 p.m. OK GNU C++17 TESTS 57 30 204800 2400
54251145 YouKn0wWho C May 16, 2019, 5:19 p.m. OK GNU C++17 TESTS 57 30 1228800 2400
62344797 errorgorn C Oct. 11, 2019, 7 a.m. OK GNU C++17 TESTS 57 31 0 2400
41572270 Dance_Of_Faith C Aug. 13, 2018, 11:46 p.m. OK GNU C++17 TESTS 57 31 0 2400
63217583 Charlizard C Oct. 23, 2019, 6:43 a.m. OK GNU C++17 TESTS 57 31 0 2400
69706120 Monogon C Jan. 29, 2020, 4:40 a.m. OK GNU C++17 TESTS 57 31 102400 2400
69829838 anakib1 C Jan. 30, 2020, 10:09 a.m. OK GNU C++17 TESTS 57 31 102400 2400
29344454 Lewin C Aug. 11, 2017, 6:06 a.m. OK Java 8 TESTS 57 109 20582400 2400
29344336 Lewin C Aug. 11, 2017, 5:59 a.m. OK Java 8 TESTS 57 109 20582400 2400
43422926 hulk_man C Sept. 25, 2018, 6:26 p.m. OK Java 8 TESTS 57 124 0 2400
38139245 beroul C May 12, 2018, 1:10 p.m. OK Java 8 TESTS 57 124 20684800 2400
29483351 U_Square C Aug. 15, 2017, 2:02 p.m. OK Java 8 TESTS 57 124 20787200 2400
39055447 unicorn20141 C June 8, 2018, 9:42 p.m. OK Java 8 TESTS 57 140 0 2400
20941353 alibaba C Sept. 27, 2016, 9:09 a.m. OK Java 8 TESTS 57 155 0 2400
20583756 uwi C Sept. 13, 2016, 5:16 p.m. OK Java 8 TESTS 57 155 0 2400
21801097 Dukkha C Oct. 26, 2016, 4:47 p.m. OK Java 8 TESTS 57 171 0 2400
31790886 Medicine C Oct. 27, 2017, 10:04 a.m. OK Java 8 TESTS 57 171 0 2400
21422884 eawtf C Oct. 14, 2016, 12:56 p.m. OK JavaScript TESTS 57 2262 10035200 2400
20614793 AymanWizard C Sept. 14, 2016, 1:06 p.m. OK MS C# TESTS 57 140 3174400 2400
20593638 azukun C Sept. 13, 2016, 6:14 p.m. OK MS C# TESTS 57 155 5836800 2400
20922920 sister_what_hate_most C Sept. 26, 2016, 10:19 a.m. OK MS C++ TESTS 57 46 72704000 2400
35526653 ArashY C Feb. 20, 2018, 4:01 p.m. OK MS C++ TESTS 57 46 74240000 2400
25342052 vjudge4 C March 8, 2017, 1:23 p.m. OK MS C++ TESTS 57 46 74752000 2400
20593669 Oleg_Smirnov C Sept. 13, 2016, 6:15 p.m. OK MS C++ TESTS 57 61 102400 2400
20586195 Hujiwara C Sept. 13, 2016, 5:27 p.m. OK MS C++ TESTS 57 61 102400 2400
25100519 vjudge1 C Feb. 28, 2017, 12:33 p.m. OK MS C++ TESTS 57 61 74752000 2400
44756649 vjudge3 C Oct. 24, 2018, 2:38 a.m. OK MS C++ TESTS 57 62 72704000 2400
25100495 plus1s C Feb. 28, 2017, 12:32 p.m. OK MS C++ TESTS 57 62 74752000 2400
20888159 Tsukasa C Sept. 24, 2016, 12:48 p.m. OK MS C++ TESTS 57 77 145305600 2400
20599354 DimonK C Sept. 13, 2016, 8:35 p.m. OK MS C++ TESTS 57 78 204800 2400
60736997 aaron2truong C Sept. 17, 2019, 5:59 p.m. OK MS C++ 2017 TESTS 57 62 72192000 2400
58315196 vjudge4 C Aug. 5, 2019, 2:29 a.m. OK MS C++ 2017 TESTS 57 77 72499200 2400
20677665 raihatneloy C Sept. 17, 2016, 9:23 a.m. OK PyPy 2 TESTS 57 1122 9216000 2400
20677613 raihatneloy C Sept. 17, 2016, 9:21 a.m. OK PyPy 2 TESTS 57 1294 9318400 2400
53112964 SamuelLH C April 22, 2019, 5:30 a.m. OK Python 3 TESTS 57 311 409600 2400

remove filters

Back to search problems