Codeforces Round 594 (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
1239 Codeforces Round 594 (Div. 1) FINISHED False 7200 165617663 Oct. 20, 2019, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1039 ) E Turtle PROGRAMMING dp implementation 3100

B'Kolya has a turtle and a field of size 2 x n . The field rows are numbered from 1 to 2 from top to bottom, while the columns are numbered from 1 to n from left to right. Suppose in each cell of the field there is a lettuce leaf. The energy value of lettuce leaf in row i and column j is equal to a_{i,j} . The turtle is initially in the top left cell and wants to reach the bottom right cell. The turtle can only move right and down and among all possible ways it will choose a way, maximizing the total energy value of lettuce leaves (in case there are several such paths, it will choose any of them). Kolya is afraid, that if turtle will eat too much lettuce, it can be bad for its health. So he wants to reorder lettuce leaves in the field, so that the energetic cost of leaves eaten by turtle will be minimized. The first line contains an integer n ( 2 <= n <= 25 ) -- the length of the field. The second line contains n integers a_{1, i} ( 0 <= a_{1, i} <= 50 ,000 ), the energetic cost of lettuce leaves in the first row of the field. The third line contains n integers a_{2, i} ( 0 <= a_{2, i} <= 50 ,000 ), the energetic cost of lettuce leaves in the second row of the field. Print two lines with n integers in each -- the optimal reordering of lettuce from the input data. In case there are several optimal ways to reorder lettuce, print any of them. In the first example, after reordering, the turtle will eat lettuce with total energetic cost 1+4+2 = 7 . In the second example, the turtle will eat lettuce with energetic cost equal 0 . In the third example, after reordering, the turtle will eat lettuce with total energetic cost equal 1 . '...

Tutorials

Editorial of Codeforces Round #594 (on the problems of Moscow Team Olympiad)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
63092673 Chipe1 E Oct. 21, 2019, 7:07 p.m. OK GNU C11 TESTS 49 2246 307712000 3100
63365566 vjudge1 E Oct. 25, 2019, 7:21 a.m. OK GNU C++11 TESTS 49 124 192102400 3100
63057271 Frame233 E Oct. 21, 2019, 6:58 a.m. OK GNU C++11 TESTS 47 139 224460800 3100
63130586 Helivico E Oct. 22, 2019, 2:04 p.m. OK GNU C++11 TESTS 49 140 203673600 3100
64506132 zdbtxdy E Nov. 8, 2019, 6:56 a.m. OK GNU C++11 TESTS 49 140 212172800 3100
63964337 _twilight E Nov. 1, 2019, 6:35 a.m. OK GNU C++11 TESTS 49 140 216371200 3100
63192312 AlexPop28 E Oct. 22, 2019, 5:32 p.m. OK GNU C++11 TESTS 49 155 196198400 3100
63103911 WZYYN E Oct. 22, 2019, 3:06 a.m. OK GNU C++11 TESTS 49 155 211968000 3100
63104024 YangDavid E Oct. 22, 2019, 3:12 a.m. OK GNU C++11 TESTS 49 155 212172800 3100
63120263 LJC00118 E Oct. 22, 2019, 10:58 a.m. OK GNU C++11 TESTS 49 156 199782400 3100
63703591 zyt1253679098 E Oct. 29, 2019, 8:09 a.m. OK GNU C++11 TESTS 49 170 211763200 3100
63053536 Marckess E Oct. 21, 2019, 4:41 a.m. OK GNU C++14 TESTS 47 156 220262400 3100
63069516 newbiegcz E Oct. 21, 2019, 11:58 a.m. OK GNU C++14 TESTS 47 170 224153600 3100
63054834 yan-zp E Oct. 21, 2019, 5:40 a.m. OK GNU C++14 TESTS 47 171 188313600 3100
63125433 Scut82 E Oct. 22, 2019, 12:41 p.m. OK GNU C++14 TESTS 49 171 212172800 3100
63040886 mayaohua2003 E Oct. 21, 2019, 12:39 a.m. OK GNU C++14 TESTS 47 186 211968000 3100
63414413 Franklyn_W E Oct. 26, 2019, 3:10 a.m. OK GNU C++14 TESTS 49 187 235315200 3100
63499944 Peti E Oct. 26, 2019, 4:50 p.m. OK GNU C++14 TESTS 49 202 173568000 3100
67625392 Benq E Dec. 25, 2019, 9:17 p.m. OK GNU C++14 TESTS 49 202 207872000 3100
64272810 Weeeee E Nov. 4, 2019, 7:48 p.m. OK GNU C++14 TESTS 49 218 247091200 3100
64787892 HIR180 E Nov. 13, 2019, 9:54 a.m. OK GNU C++14 TESTS 49 218 313856000 3100
66234525 Gediminas E Dec. 3, 2019, 3:38 p.m. OK GNU C++17 TESTS 49 93 3379200 3100
66234591 Gediminas E Dec. 3, 2019, 3:39 p.m. OK GNU C++17 TESTS 49 108 4096000 3100
63244450 papa3 E Oct. 23, 2019, 2:17 p.m. OK GNU C++17 TESTS 49 109 5120000 3100
63244398 papa3 E Oct. 23, 2019, 2:16 p.m. OK GNU C++17 TESTS 49 124 5120000 3100
63039381 Xellos E Oct. 20, 2019, 11:11 p.m. OK GNU C++17 TESTS 47 140 94515200 3100
63027550 I_love_chickpea E Oct. 20, 2019, 4:55 p.m. OK GNU C++17 TESTS 47 140 212275200 3100
66233914 Gediminas E Dec. 3, 2019, 3:26 p.m. OK GNU C++17 TESTS 49 155 153702400 3100
66234384 Gediminas E Dec. 3, 2019, 3:36 p.m. OK GNU C++17 TESTS 49 155 153702400 3100
63546965 Tneluccus E Oct. 27, 2019, 10:45 a.m. OK GNU C++17 TESTS 49 155 207872000 3100
66137939 .__. E Dec. 1, 2019, 1:03 p.m. OK GNU C++17 TESTS 49 170 139366400 3100
65154498 dbelov E Nov. 16, 2019, 8:47 a.m. OK MS C++ 2017 TESTS 49 265 265523200 3100
63081908 Kirundel E Oct. 21, 2019, 3:22 p.m. OK MS C++ 2017 TESTS 47 1934 188518400 3100

remove filters

Back to search problems