Codeforces Round 508 (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
1038 Codeforces Round 508 (Div. 2) FINISHED False 7200 195575099 Sept. 6, 2018, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8414 ) D Slime PROGRAMMING dp greedy implementation 1700

B'There are n slimes in a row. Each slime has an integer value (possibly negative or zero) associated with it. Any slime can eat its adjacent slime (the closest slime to its left or to its right, assuming that this slime exists). When a slime with a value x eats a slime with a value y , the eaten slime disappears, and the value of the remaining slime changes to x - y . The slimes will eat each other until there is only one slime left. Find the maximum possible value of the last slime. The first line of the input contains an integer n ( 1 <= n <= 500 ,000 ) denoting the number of slimes. The next line contains n integers a_i ( -10^9 <= a_i <= 10^9 ), where a_i is the value of i -th slime. Print an only integer -- the maximum possible value of the last slime. In the first example, a possible way of getting the last slime with value 4 is: In the second example, the first slime can keep eating slimes to its right to end up with a value of 4 . '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
42718691 rr_ D Sept. 9, 2018, 9:28 p.m. OK D TESTS 107 264 30617600 1700
43182749 cpy D Sept. 21, 2018, 2:04 p.m. OK D TESTS 107 405 97792000 1700
42609289 ruban D Sept. 7, 2018, 9:57 a.m. OK Delphi TESTS 107 171 21913600 1700
43568005 107 D Sept. 29, 2018, 11:49 a.m. OK FPC TESTS 107 140 2048000 1700
46134407 tranquangtien942qn D Nov. 24, 2018, 4:40 a.m. OK FPC TESTS 107 155 2048000 1700
46234223 Aschente D Nov. 26, 2018, 12:10 a.m. OK FPC TESTS 107 155 4096000 1700
42586422 petr577 D Sept. 6, 2018, 5:22 p.m. OK FPC TESTS 107 170 0 1700
42591300 TShT D Sept. 6, 2018, 8:01 p.m. OK FPC TESTS 107 186 3993600 1700
45318829 chaorenhaha D Nov. 5, 2018, 9:29 a.m. OK FPC TESTS 107 187 2048000 1700
42689575 freyes D Sept. 8, 2018, 10:48 p.m. OK GNU C11 TESTS 107 124 0 1700
46190224 ask6 D Nov. 25, 2018, 4:13 a.m. OK GNU C11 TESTS 107 124 3993600 1700
42602345 Shinchan6599 D Sept. 7, 2018, 5:38 a.m. OK GNU C11 TESTS 107 140 0 1700
42592722 sansen D Sept. 6, 2018, 8:42 p.m. OK GNU C11 TESTS 107 140 2048000 1700
65022440 Dream.to D Nov. 15, 2019, 5:56 a.m. OK GNU C11 TESTS 107 140 3993600 1700
43036879 Kuhhaku D Sept. 18, 2018, 1:57 p.m. OK GNU C11 TESTS 107 140 3993600 1700
42579758 geckods D Sept. 6, 2018, 4:45 p.m. OK GNU C11 TESTS 107 155 3993600 1700
43048180 Kuhhaku D Sept. 18, 2018, 7:20 p.m. OK GNU C11 TESTS 107 202 3993600 1700
45325195 luogu_bot2 D Nov. 5, 2018, 12:36 p.m. OK GNU C++11 TESTS 107 46 0 1700
45162424 Always D Nov. 1, 2018, 9:45 a.m. OK GNU C++11 TESTS 107 46 0 1700
42722547 LittleFall D Sept. 10, 2018, 3:37 a.m. OK GNU C++11 TESTS 107 46 0 1700
42608191 rohankag7 D Sept. 7, 2018, 9:18 a.m. OK GNU C++11 TESTS 107 46 0 1700
45325357 luogu_bot3 D Nov. 5, 2018, 12:40 p.m. OK GNU C++11 TESTS 107 46 0 1700
46967957 Scut82 D Dec. 13, 2018, 12:21 p.m. OK GNU C++11 TESTS 107 46 0 1700
45162367 pobiren D Nov. 1, 2018, 9:43 a.m. OK GNU C++11 TESTS 107 46 102400 1700
43174171 vjudge3 D Sept. 21, 2018, 10:15 a.m. OK GNU C++11 TESTS 107 46 307200 1700
43174145 luogu_bot4 D Sept. 21, 2018, 10:14 a.m. OK GNU C++11 TESTS 107 46 307200 1700
43174096 Mirach D Sept. 21, 2018, 10:12 a.m. OK GNU C++11 TESTS 107 46 307200 1700
61274467 vishnu_m D Sept. 25, 2019, 2:59 p.m. OK GNU C++14 TESTS 107 46 0 1700
42609104 nickluo D Sept. 7, 2018, 9:50 a.m. OK GNU C++14 TESTS 107 46 102400 1700
42592159 Linkus D Sept. 6, 2018, 8:22 p.m. OK GNU C++14 TESTS 107 46 2048000 1700
42695980 ReaLNero1 D Sept. 9, 2018, 7:11 a.m. OK GNU C++14 TESTS 107 46 2048000 1700
46388324 wleung_bvg D Nov. 30, 2018, 2:40 a.m. OK GNU C++14 TESTS 107 62 3993600 1700
42609018 Tanvir021 D Sept. 7, 2018, 9:46 a.m. OK GNU C++14 TESTS 107 124 1945600 1700
42577873 mohamedeltair D Sept. 6, 2018, 4:37 p.m. OK GNU C++14 TESTS 107 124 2048000 1700
42855761 snowy_smile D Sept. 14, 2018, 9:20 a.m. OK GNU C++14 TESTS 107 124 3993600 1700
45707727 ray-asuka D Nov. 14, 2018, 12:28 p.m. OK GNU C++14 TESTS 107 124 11980800 1700
62974405 Mynesis D Oct. 20, 2019, 8:04 a.m. OK GNU C++14 TESTS 107 124 12083200 1700
45162445 ddpag D Nov. 1, 2018, 9:45 a.m. OK GNU C++17 TESTS 107 31 409600 1700
65816296 910306264 D Nov. 27, 2019, 9:34 a.m. OK GNU C++17 TESTS 107 46 9113600 1700
42899131 JewRaper D Sept. 15, 2018, 5:40 p.m. OK GNU C++17 TESTS 107 46 202444800 1700
43544855 UnstoppableChillMachine D Sept. 28, 2018, 6:43 p.m. OK GNU C++17 TESTS 107 62 3993600 1700
42788204 Playnext D Sept. 12, 2018, 6:21 a.m. OK GNU C++17 TESTS 107 62 6348800 1700
42658916 fzh0917 D Sept. 8, 2018, 2:14 a.m. OK GNU C++17 TESTS 107 93 4505600 1700
44738529 q234rty D Oct. 23, 2018, 1:43 p.m. OK GNU C++17 TESTS 107 93 34304000 1700
48441590 andrew4936 D Jan. 16, 2019, 4:07 a.m. OK GNU C++17 TESTS 107 108 204800 1700
44322603 massimodong D Oct. 14, 2018, 2:43 p.m. OK GNU C++17 TESTS 107 109 307200 1700
42875453 RyanStark D Sept. 14, 2018, 11:32 p.m. OK GNU C++17 TESTS 107 124 1945600 1700
42990671 leafs99 D Sept. 17, 2018, 10:01 a.m. OK Go TESTS 107 186 23142400 1700
61225429 synapse D Sept. 24, 2019, 3:05 p.m. OK Go TESTS 107 514 5324800 1700
42821954 treasuryonly D Sept. 13, 2018, 7:13 a.m. OK Go TESTS 107 655 21401600 1700
42858470 otter D Sept. 14, 2018, 11:20 a.m. OK Haskell TESTS 107 155 14438400 1700
69568079 Kimo_Fathy D Jan. 26, 2020, 1:09 p.m. OK Java 11 TESTS 107 311 15769600 1700
62424415 saurabhs1206 D Oct. 12, 2019, 1:52 p.m. OK Java 8 TESTS 107 140 0 1700
47820050 Faizan D Jan. 1, 2019, 5:03 p.m. OK Java 8 TESTS 107 140 0 1700
45650508 megaspazz D Nov. 13, 2018, 12:41 a.m. OK Java 8 TESTS 107 155 0 1700
42582567 Baelish D Sept. 6, 2018, 5 p.m. OK Java 8 TESTS 107 155 0 1700
60342389 Shady51 D Sept. 10, 2019, 11:22 a.m. OK Java 8 TESTS 107 170 0 1700
45650846 megaspazz D Nov. 13, 2018, 1:10 a.m. OK Java 8 TESTS 107 170 0 1700
42605238 bomlalung D Sept. 7, 2018, 7:25 a.m. OK Java 8 TESTS 107 170 14540800 1700
65939170 bluesky111 D Nov. 29, 2019, 4:59 a.m. OK Java 8 TESTS 107 171 0 1700
65566925 thisbeit D Nov. 23, 2019, 6:17 a.m. OK Java 8 TESTS 107 171 0 1700
60938980 mTvTm D Sept. 20, 2019, 4:22 p.m. OK Java 8 TESTS 107 171 0 1700
59899125 vjudge3 D Sept. 2, 2019, 1:05 p.m. OK Kotlin TESTS 107 264 38502400 1700
43649471 stepanovep D Oct. 1, 2018, 3:04 p.m. OK Kotlin TESTS 107 311 40038400 1700
59903077 vjudge3 D Sept. 2, 2019, 2:19 p.m. OK Kotlin TESTS 107 327 33382400 1700
59903209 vjudge5 D Sept. 2, 2019, 2:22 p.m. OK Kotlin TESTS 107 545 43417600 1700
56256477 og.kostya D June 29, 2019, 6:20 a.m. OK Mono C# TESTS 107 93 5632000 1700
43363047 kostyanf14 D Sept. 24, 2018, 10:41 a.m. OK Mono C# TESTS 107 280 74137600 1700
42703849 TrinidadTobago D Sept. 9, 2018, 12:03 p.m. OK Mono C# TESTS 107 295 60313600 1700
42858513 Tatonka D Sept. 14, 2018, 11:21 a.m. OK Mono C# TESTS 107 296 67891200 1700
42581875 fr0st D Sept. 6, 2018, 4:56 p.m. OK Mono C# TESTS 107 296 108032000 1700
42615697 GustavK D Sept. 7, 2018, 1:34 p.m. OK Mono C# TESTS 107 312 67788800 1700
42599894 Strelokask D Sept. 7, 2018, 3:50 a.m. OK Mono C# TESTS 107 343 74137600 1700
49900410 vjudge1 D Feb. 14, 2019, 9:03 a.m. OK MS C++ TESTS 107 108 2048000 1700
47284749 vjudge3 D Dec. 20, 2018, 5:17 a.m. OK MS C++ TESTS 107 108 2048000 1700
45444683 vjudge1 D Nov. 8, 2018, 12:47 p.m. OK MS C++ TESTS 107 108 16076800 1700
47285169 vjudge4 D Dec. 20, 2018, 5:38 a.m. OK MS C++ TESTS 107 109 0 1700
44055443 vjudge5 D Oct. 9, 2018, 11:23 p.m. OK MS C++ TESTS 107 109 307200 1700
47284742 vjudge4 D Dec. 20, 2018, 5:17 a.m. OK MS C++ TESTS 107 109 2048000 1700
47349406 vjudge2 D Dec. 22, 2018, 12:27 a.m. OK MS C++ TESTS 107 109 2048000 1700
47284845 vjudge5 D Dec. 20, 2018, 5:23 a.m. OK MS C++ TESTS 107 109 2048000 1700
47284778 vjudge1 D Dec. 20, 2018, 5:20 a.m. OK MS C++ TESTS 107 109 2048000 1700
60927452 vjudge3 D Sept. 20, 2019, 12:42 p.m. OK MS C++ TESTS 107 109 3993600 1700
63657835 vjudge3 D Oct. 28, 2019, 1:13 p.m. OK MS C++ 2017 TESTS 107 171 4300800 1700
65283148 vjudge2 D Nov. 18, 2019, 7 a.m. OK MS C++ 2017 TESTS 107 187 3993600 1700
62104007 AleksanderBalobanov D Oct. 8, 2019, 10:07 a.m. OK MS C++ 2017 TESTS 107 202 3993600 1700
63658148 vjudge5 D Oct. 28, 2019, 1:18 p.m. OK MS C++ 2017 TESTS 107 202 3993600 1700
62891032 pmitkov D Oct. 18, 2019, 8:29 p.m. OK MS C++ 2017 TESTS 107 264 14131200 1700
50174198 amolb89 D Feb. 19, 2019, 2:56 p.m. OK MS C++ 2017 TESTS 107 499 0 1700
69875811 vjudge2 D Jan. 31, 2020, 3:57 a.m. OK MS C++ 2017 TESTS 107 529 2252800 1700
42584122 sk0 D Sept. 6, 2018, 5:09 p.m. OK Ocaml TESTS 107 889 11059200 1700
44925271 c1729 D Oct. 26, 2018, 7:48 p.m. OK PyPy 2 TESTS 107 280 48537600 1700
51767842 raj1307 D March 23, 2019, 4:47 p.m. OK PyPy 2 TESTS 107 311 47104000 1700
42601117 Butane D Sept. 7, 2018, 4:48 a.m. OK PyPy 2 TESTS 107 312 34816000 1700
42586222 YESMAths D Sept. 6, 2018, 5:21 p.m. OK PyPy 2 TESTS 107 343 34816000 1700
42579533 Onesh0t D Sept. 6, 2018, 4:44 p.m. OK PyPy 2 TESTS 107 358 39116800 1700
42897694 supachai_pay D Sept. 15, 2018, 4:33 p.m. OK PyPy 2 TESTS 107 389 34816000 1700
42587672 morgo D Sept. 6, 2018, 5:29 p.m. OK PyPy 2 TESTS 107 389 39116800 1700
43648180 soumyasarkar1998 D Oct. 1, 2018, 2:35 p.m. OK PyPy 2 TESTS 107 405 34816000 1700
43210802 bhuya D Sept. 21, 2018, 4:09 p.m. OK PyPy 2 TESTS 107 436 44441600 1700
42581413 ManasG D Sept. 6, 2018, 4:54 p.m. OK PyPy 2 TESTS 107 514 35430400 1700
47669953 yellowflash D Dec. 29, 2018, 4:59 a.m. OK PyPy 3 TESTS 107 576 55603200 1700
48308228 homoeconomicus D Jan. 12, 2019, 9:40 p.m. OK PyPy 3 TESTS 107 623 55705600 1700
54062174 ragnar7 D May 13, 2019, 11:44 a.m. OK PyPy 3 TESTS 107 623 55808000 1700
44656067 vjudge1 D Oct. 21, 2018, 1:06 p.m. OK PyPy 3 TESTS 107 639 55500800 1700
65903888 AvinashKartik D Nov. 28, 2019, 10:01 a.m. OK PyPy 3 TESTS 107 655 42393600 1700
42784730 neal D Sept. 12, 2018, 2:47 a.m. OK PyPy 3 TESTS 107 686 62873600 1700
42614502 dluschan D Sept. 7, 2018, 12:58 p.m. OK PyPy 3 TESTS 107 701 49152000 1700
42585341 chiefsan D Sept. 6, 2018, 5:16 p.m. OK PyPy 3 TESTS 107 701 55808000 1700
43250567 DedMartyn D Sept. 22, 2018, 12:16 p.m. OK PyPy 3 TESTS 107 717 55500800 1700
42608721 LordVader D Sept. 7, 2018, 9:35 a.m. OK PyPy 3 TESTS 107 717 59699200 1700
55710355 anshuman16423 D June 18, 2019, 9:58 a.m. OK Python 2 TESTS 107 607 27136000 1700
42592707 kaif_7 D Sept. 6, 2018, 8:41 p.m. OK Python 2 TESTS 107 639 27238400 1700
43994617 radhikapillai25 D Oct. 8, 2018, 10:52 a.m. OK Python 2 TESTS 107 655 27238400 1700
43994918 onextdg D Oct. 8, 2018, 11:01 a.m. OK Python 2 TESTS 107 670 27136000 1700
42591690 aniketgattani D Sept. 6, 2018, 8:10 p.m. OK Python 2 TESTS 107 686 27238400 1700
42578754 hellohell D Sept. 6, 2018, 4:41 p.m. OK Python 2 TESTS 107 701 27238400 1700
42653478 ruchit2801 D Sept. 7, 2018, 8:03 p.m. OK Python 2 TESTS 107 780 27136000 1700
43017919 biltharesatyendra D Sept. 18, 2018, 1:37 a.m. OK Python 2 TESTS 107 826 27136000 1700
42757021 tnowakow D Sept. 11, 2018, 7:57 a.m. OK Python 2 TESTS 107 857 27136000 1700
42599932 asfd221 D Sept. 7, 2018, 3:51 a.m. OK Python 2 TESTS 107 904 27136000 1700
46021384 Firepaw D Nov. 21, 2018, 8:20 a.m. OK Python 3 TESTS 107 374 40448000 1700
67265847 Iris_A D Dec. 20, 2019, 6:08 a.m. OK Python 3 TESTS 107 390 41164800 1700
65480205 abo22 D Nov. 21, 2019, 11:26 a.m. OK Python 3 TESTS 107 405 38912000 1700
50688490 mibobkov D March 2, 2019, 2:37 p.m. OK Python 3 TESTS 107 405 45363200 1700
42599756 sy_chen D Sept. 7, 2018, 3:43 a.m. OK Python 3 TESTS 107 420 38809600 1700
42602010 Bamal D Sept. 7, 2018, 5:25 a.m. OK Python 3 TESTS 107 436 38809600 1700
42592848 pylol D Sept. 6, 2018, 8:46 p.m. OK Python 3 TESTS 107 436 38809600 1700
42582169 -ilja- D Sept. 6, 2018, 4:58 p.m. OK Python 3 TESTS 107 436 38809600 1700
43483664 rohithill D Sept. 27, 2018, 8:49 a.m. OK Python 3 TESTS 107 451 40448000 1700
43371064 sergovoy D Sept. 24, 2018, 2:31 p.m. OK Python 3 TESTS 107 452 38809600 1700
66244091 tuna_salad D Dec. 3, 2019, 7:32 p.m. OK Rust TESTS 107 139 14233600 1700
42606174 yakamoto D Sept. 7, 2018, 7:59 a.m. OK Scala TESTS 107 701 37683200 1700

remove filters

Back to search problems