Codeforces Round 344 (Div. 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
631 Codeforces Round 344 (Div. 2) FINISHED False 7200 274800299 March 3, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2407 ) E Product Sum PROGRAMMING data structures dp geometry 2500

B"Blake is the boss of Kris, however, this doesn't spoil their friendship. They often gather at the bar to talk about intriguing problems about maximising some values. This time the problem is really special. You are given an array a of length n. The characteristic of this array is the value -- the sum of the products of the values ai by i. One may perform the following operation exactly once: pick some element of the array and move to any position. In particular, it's allowed to move the element to the beginning or to the end of the array. Also, it's allowed to put it back to the initial position. The goal is to get the array with the maximum possible value of characteristic. The first line of the input contains a single integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200 xe2 x80 x89000) -- the size of the array a. The second line contains n integers ai (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, |ai| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891 xe2 x80 x89000 xe2 x80 x89000) -- the elements of the array a. Print a single integer -- the maximum possible value of characteristic of a that can be obtained by performing no more than one move. In the first sample, one may pick the first element and place it before the third (before 5). Thus, the answer will be 3 xc2 xb71 xe2 x80 x89+ xe2 x80 x892 xc2 xb72 xe2 x80 x89+ xe2 x80 x894 xc2 xb73 xe2 x80 x89+ xe2 x80 x895 xc2 xb74 xe2 x80 x89= xe2 x80 x8939. In the second sample, one may pick the fifth element of the array and place it before the third. The answer will be 1 xc2 xb71 xe2 x80 x89+ xe2 x80 x891 xc2 xb72 xe2 x80 x89+ xe2 x80 x891 xc2 xb73 xe2 x80 x89+ xe2 x80 x892 xc2 xb74 xe2 x80 x89+ xe2 x80 x897 xc2 xb75 xe2 x80 x89= xe2 x80 x8949."...

Tutorials

Editorial Codeforces Round #344 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
16749042 dathvan E March 16, 2016, 4:06 p.m. OK FPC TESTS 57 202 13004800 2500
25814552 1919810 E March 26, 2017, 8:49 a.m. OK GNU C++ TESTS 57 31 5120000 2500
16643482 Arturia E March 11, 2016, 6:04 a.m. OK GNU C++ TESTS 57 46 5427200 2500
16507301 mxh1999 E March 4, 2016, 1:58 a.m. OK GNU C++ TESTS 54 46 6451200 2500
19679772 Wuvin E Aug. 7, 2016, 4:16 a.m. OK GNU C++ TESTS 57 46 6860800 2500
25541309 T123CK E March 16, 2017, 7:44 a.m. OK GNU C++ TESTS 57 46 8499200 2500
18911162 AkaneSasu E July 6, 2016, 4:03 a.m. OK GNU C++ TESTS 57 61 5427200 2500
16534415 OpenTheDoor E March 5, 2016, 1:04 p.m. OK GNU C++ TESTS 56 62 2457600 2500
16642328 lcr E March 11, 2016, 3:28 a.m. OK GNU C++ TESTS 57 62 3174400 2500
25814651 1919810 E March 26, 2017, 8:54 a.m. OK GNU C++ TESTS 57 62 5324800 2500
16561912 unknown_shadow E March 7, 2016, 8:20 a.m. OK GNU C++ TESTS 57 62 6246400 2500
16507694 Altria-PenDragon E March 4, 2016, 2:47 a.m. OK GNU C++11 TESTS 54 31 5427200 2500
16507691 syc1999 E March 4, 2016, 2:46 a.m. OK GNU C++11 TESTS 54 31 5427200 2500
16507682 OB.Zhou E March 4, 2016, 2:45 a.m. OK GNU C++11 TESTS 54 31 5427200 2500
16641609 ffao E March 11, 2016, 1:03 a.m. OK GNU C++11 TESTS 57 46 2560000 2500
58935031 Rockyyh E Aug. 17, 2019, 3:31 a.m. OK GNU C++11 TESTS 57 46 3379200 2500
58896409 bjxdw E Aug. 16, 2019, 7:42 a.m. OK GNU C++11 TESTS 57 46 3993600 2500
40985017 ReaLNero1 E July 30, 2018, 7:42 p.m. OK GNU C++11 TESTS 57 46 5427200 2500
25837620 blutrex E March 27, 2017, 12:06 p.m. OK GNU C++11 TESTS 57 46 5939200 2500
64673899 justin_cao E Nov. 11, 2019, 7:14 a.m. OK GNU C++11 TESTS 57 46 6451200 2500
64673014 boshi E Nov. 11, 2019, 6:51 a.m. OK GNU C++11 TESTS 57 46 6451200 2500
30803912 Sothan E Sept. 28, 2017, 12:14 p.m. OK GNU C++14 TESTS 57 62 5734400 2500
52225978 Nostalgically E April 2, 2019, 9:29 a.m. OK GNU C++14 TESTS 57 62 7884800 2500
61086879 lets_get_schwifty E Sept. 22, 2019, 6:45 p.m. OK GNU C++14 TESTS 57 77 2560000 2500
23024524 AshishYadav E Dec. 16, 2016, 7:59 a.m. OK GNU C++14 TESTS 57 78 3174400 2500
50774616 NotNight E March 4, 2019, 7:37 a.m. OK GNU C++14 TESTS 57 78 4300800 2500
32291450 0101-1001 E Nov. 13, 2017, 6:04 p.m. OK GNU C++14 TESTS 57 78 10342400 2500
43662403 how_to_become_purple E Oct. 1, 2018, 7:51 p.m. OK GNU C++14 TESTS 57 93 7270400 2500
32087073 vox_r E Nov. 6, 2017, 4:02 a.m. OK GNU C++14 TESTS 57 93 8294400 2500
29233714 letsbe E Aug. 6, 2017, 5:44 a.m. OK GNU C++14 TESTS 57 93 9625600 2500
28785590 wrinx E July 22, 2017, 7:09 p.m. OK GNU C++14 TESTS 57 93 9932800 2500
41205253 vjudge2 E Aug. 4, 2018, 7:29 a.m. OK GNU C++17 TESTS 57 78 3174400 2500
54266146 vjudge1 E May 17, 2019, 6:06 a.m. OK GNU C++17 TESTS 57 78 6451200 2500
50562721 vjudge1 E Feb. 27, 2019, 11:51 a.m. OK GNU C++17 TESTS 57 93 3993600 2500
69876936 ruo E Jan. 31, 2020, 4:34 a.m. OK GNU C++17 TESTS 57 93 5632000 2500
59932660 1orforever E Sept. 3, 2019, 8 a.m. OK GNU C++17 TESTS 57 93 5632000 2500
52268456 i_am_sooke E April 3, 2019, 12:16 p.m. OK GNU C++17 TESTS 57 93 5632000 2500
52614926 201831990439 E April 11, 2019, 5:53 p.m. OK GNU C++17 TESTS 57 93 6348800 2500
54266335 vjudge2 E May 17, 2019, 6:13 a.m. OK GNU C++17 TESTS 57 93 6451200 2500
41448904 zbtrs E Aug. 11, 2018, 2:29 a.m. OK GNU C++17 TESTS 57 108 4812800 2500
58899277 Hugin E Aug. 16, 2019, 8:36 a.m. OK GNU C++17 TESTS 57 108 6451200 2500
18483272 mkirsche E June 14, 2016, 11:06 p.m. OK Java 7 TESTS 57 546 47411200 2500
16625258 baobab E March 9, 2016, 10:35 p.m. OK Java 8 TESTS 57 186 0 2500
16639045 baobab E March 10, 2016, 7:36 p.m. OK Java 8 TESTS 57 187 0 2500
48556059 vjudge5 E Jan. 19, 2019, 5:26 a.m. OK Java 8 TESTS 57 202 0 2500
36041435 Omar_Morsi E March 7, 2018, 11:18 a.m. OK Java 8 TESTS 57 218 38809600 2500
48556015 aminul E Jan. 19, 2019, 5:25 a.m. OK Java 8 TESTS 57 233 0 2500
18526528 hiro116s E June 16, 2016, 5:01 p.m. OK Java 8 TESTS 57 233 0 2500
57136159 ZeyadKhattab E July 16, 2019, 8:59 a.m. OK Java 8 TESTS 57 233 6553600 2500
44889423 xodiac E Oct. 26, 2018, 1:59 a.m. OK Java 8 TESTS 57 249 5529600 2500
23414430 ronakvaghela45 E Dec. 30, 2016, 7:25 a.m. OK Java 8 TESTS 57 249 61542400 2500
23414404 ronakvaghela45 E Dec. 30, 2016, 7:24 a.m. OK Java 8 TESTS 57 265 61542400 2500
25655257 leign E March 19, 2017, 8:47 p.m. OK Mono C# TESTS 57 140 43622400 2500
51951120 TrabajoNocturno E March 28, 2019, 8:18 p.m. OK Mono C# TESTS 57 186 102502400 2500
52628499 vjudge1 E April 12, 2019, 5:31 a.m. OK MS C++ TESTS 57 78 4812800 2500
16529240 iblacksun E March 5, 2016, 8:19 a.m. OK MS C++ TESTS 56 108 3993600 2500
17924689 ssw20002 E May 15, 2016, 8:23 p.m. OK MS C++ TESTS 57 124 10240000 2500
28012978 handsomeIvan E June 24, 2017, 10:38 p.m. OK MS C++ TESTS 57 139 9318400 2500
49150745 vjudge1 E Jan. 29, 2019, 12:32 p.m. OK MS C++ TESTS 57 140 3174400 2500
28012982 handsomeIvan E June 24, 2017, 10:39 p.m. OK MS C++ TESTS 57 140 5324800 2500
45346334 vjudge3 E Nov. 6, 2018, 3:30 a.m. OK MS C++ TESTS 57 156 3481600 2500
16500316 vintage_Vlad_Makeev E March 3, 2016, 7:12 p.m. OK MS C++ TESTS 48 187 9216000 2500
16552009 Radi4 E March 6, 2016, 12:22 p.m. OK MS C++ TESTS 57 218 8192000 2500
16557772 AleksanderBalobanov E March 6, 2016, 8:25 p.m. OK MS C++ TESTS 57 218 18636800 2500

remove filters

Back to search problems