Codeforces Round 676 (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
1421 Codeforces Round 676 (Div. 2) FINISHED False 7200 128811299 Oct. 18, 2020, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 703 ) E Swedish Heroes PROGRAMMING brute force dp implementation

B"While playing yet another strategy game, Mans has recruited n Swedish heroes, whose powers which can be represented as an array a . Unfortunately, not all of those mighty heroes were created as capable as he wanted, so that he decided to do something about it. In order to accomplish his goal, he can pick two consecutive heroes, with powers a_i and a_{i+1} , remove them and insert a hero with power -(a_i+a_{i+1}) back in the same position. For example if the array contains the elements [5, 6, 7, 8] , he can pick 6 and 7 and get [5, -(6+7), 8] = [5, -13, 8] . After he will perform this operation n-1 times, Mans will end up having only one hero. He wants his power to be as big as possible. What's the largest possible power he can achieve? The first line contains a single integer n ( 1 <= n <= 200000 ). The second line contains n integers a_1, a_2, ldots, a_n ( -10^9 <= a_i <= 10^9 ) -- powers of the heroes. Print the largest possible power he can achieve after n-1 operations. Suitable list of operations for the first sample: [5, 6, 7, 8] rightarrow [-11, 7, 8] rightarrow [-11, -15] rightarrow [26] "...

Tutorials

Codeforces Round #676 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
95942507 2018LZY E Oct. 19, 2020, 3:27 a.m. OK GNU C++11 TESTS 42 46 3993600
95939526 allfadeaway E Oct. 19, 2020, 1:40 a.m. OK GNU C++11 TESTS 42 46 7987200
95940978 MicroMaker E Oct. 19, 2020, 2:40 a.m. OK GNU C++11 TESTS 42 46 20889600
95900664 OIerwanhong E Oct. 18, 2020, 11:47 a.m. OK GNU C++11 TESTS 42 62 3174400
95939941 huzhaoyang E Oct. 19, 2020, 1:59 a.m. OK GNU C++11 TESTS 42 62 7270400
95941801 Wankupi E Oct. 19, 2020, 3:06 a.m. OK GNU C++11 TESTS 42 62 10240000
95939195 sunzihao E Oct. 19, 2020, 1:26 a.m. OK GNU C++11 TESTS 42 62 20889600
95906839 cc0408 E Oct. 18, 2020, 1:04 p.m. OK GNU C++11 TESTS 42 62 26419200
95937873 AzusaCat E Oct. 19, 2020, 12:17 a.m. OK GNU C++11 TESTS 42 78 10444800
95940088 hht2005 E Oct. 19, 2020, 2:07 a.m. OK GNU C++11 TESTS 42 78 20070400
95887676 clyring E Oct. 18, 2020, 10:27 a.m. OK GNU C++14 TESTS 42 78 0
95937852 AzusaCat E Oct. 19, 2020, 12:16 a.m. OK GNU C++14 TESTS 42 78 10444800
95932249 SuperJ6 E Oct. 18, 2020, 8:16 p.m. OK GNU C++14 TESTS 42 93 4812800
95903120 jairadheyshyam E Oct. 18, 2020, 12:15 p.m. OK GNU C++14 TESTS 42 93 20070400
95937800 AzusaCat E Oct. 19, 2020, 12:13 a.m. OK GNU C++14 TESTS 42 93 20070400
95916598 get_r_ight E Oct. 18, 2020, 3:12 p.m. OK GNU C++14 TESTS 42 93 20889600
95941286 bluesquanium E Oct. 19, 2020, 2:50 a.m. OK GNU C++14 TESTS 42 108 6348800
95932720 Devil E Oct. 18, 2020, 8:31 p.m. OK GNU C++14 TESTS 42 108 9625600
95918445 kmjp E Oct. 18, 2020, 3:39 p.m. OK GNU C++14 TESTS 42 108 21094400
95899552 dlalswp25 E Oct. 18, 2020, 11:40 a.m. OK GNU C++14 TESTS 42 109 5120000
95900754 wiwitrifai E Oct. 18, 2020, 11:48 a.m. OK GNU C++17 TESTS 42 78 819200
95902625 Azteca E Oct. 18, 2020, 12:08 p.m. OK GNU C++17 TESTS 42 78 10444800
95900990 wiwitrifai E Oct. 18, 2020, 11:50 a.m. OK GNU C++17 TESTS 42 93 819200
95919400 Jingyuan_Li E Oct. 18, 2020, 3:53 p.m. OK GNU C++17 TESTS 42 93 3174400
95899555 Yousef_Salama E Oct. 18, 2020, 11:40 a.m. OK GNU C++17 TESTS 42 93 3174400
95893467 cuiaoxiang E Oct. 18, 2020, 10:49 a.m. OK GNU C++17 TESTS 42 93 3174400
95939606 duock28cbg E Oct. 19, 2020, 1:43 a.m. OK GNU C++17 TESTS 42 93 10444800
95900227 hank55663 E Oct. 18, 2020, 11:44 a.m. OK GNU C++17 TESTS 42 93 10444800
95937830 gzhffIThh E Oct. 19, 2020, 12:14 a.m. OK GNU C++17 TESTS 42 93 11264000
95937807 gzhffIThh E Oct. 19, 2020, 12:13 a.m. OK GNU C++17 TESTS 42 93 11264000
95917887 Egor.Lifar E Oct. 18, 2020, 3:31 p.m. OK GNU C++17 (64) TESTS 42 61 819200
95923482 dna049 E Oct. 18, 2020, 5:04 p.m. OK GNU C++17 (64) TESTS 42 61 20070400
95937833 ecnerwala E Oct. 19, 2020, 12:14 a.m. OK GNU C++17 (64) TESTS 42 62 0
95899682 ivan100sic E Oct. 18, 2020, 11:40 a.m. OK GNU C++17 (64) TESTS 42 62 819200
95905987 sh1194 E Oct. 18, 2020, 12:53 p.m. OK GNU C++17 (64) TESTS 42 62 819200
95914471 the_hyp0cr1t3 E Oct. 18, 2020, 2:44 p.m. OK GNU C++17 (64) TESTS 42 62 1638400
95936316 ecnerwala E Oct. 18, 2020, 10:46 p.m. OK GNU C++17 (64) TESTS 42 62 1638400
95917211 Honey_Badger E Oct. 18, 2020, 3:22 p.m. OK GNU C++17 (64) TESTS 42 62 3174400
95942639 angelbeats E Oct. 19, 2020, 3:31 a.m. OK GNU C++17 (64) TESTS 42 62 5632000
95901947 JooDdae E Oct. 18, 2020, 11:59 a.m. OK GNU C++17 (64) TESTS 42 77 1638400
95888039 uwi E Oct. 18, 2020, 10:28 a.m. OK Java 11 TESTS 42 218 0
95897457 Tlatoani E Oct. 18, 2020, 11:03 a.m. OK Kotlin TESTS 42 404 37273600
95901475 P___ E Oct. 18, 2020, 11:54 a.m. OK MS C++ 2017 TESTS 42 93 3584000
95928522 Megalitum E Oct. 18, 2020, 6:42 p.m. OK MS C++ 2017 TESTS 42 248 4198400
95887137 AleksanderBalobanov E Oct. 18, 2020, 10:25 a.m. OK MS C++ 2017 TESTS 42 327 156364800
95917234 EmK E Oct. 18, 2020, 3:22 p.m. OK .NET Core C# TESTS 42 171 12083200
95900366 mban259 E Oct. 18, 2020, 11:45 a.m. OK .NET Core C# TESTS 42 171 49868800
95937760 ecnerwala E Oct. 19, 2020, 12:10 a.m. OK PyPy 3 TESTS 42 373 14233600
95940648 kobae964 E Oct. 19, 2020, 2:29 a.m. OK Rust TESTS 42 171 16281600
95895035 tuna_salad E Oct. 18, 2020, 10:55 a.m. OK Rust TESTS 42 171 31334400

remove filters

Back to search problems