Codeforces Round 655 (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
1372 Codeforces Round 655 (Div. 2) FINISHED False 7200 137343299 July 11, 2020, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5411 ) D Omkar and Circle PROGRAMMING brute force constructive algorithms dp games greedy 2100

B"Danny, the local Math Maniac, is fascinated by circles, Omkar's most recent creation. Help him solve this circle problem! You are given n nonnegative integers a_1, a_2, ... , a_n arranged in a circle, where n must be odd (ie. n-1 is divisible by 2 ). Formally, for all i such that 2 <= q i <= q n , the elements a_{i - 1} and a_i are considered to be adjacent, and a_n and a_1 are also considered to be adjacent. In one operation, you pick a number on the circle, replace it with the sum of the two elements adjacent to it, and then delete the two adjacent elements from the circle. This is repeated until only one number remains in the circle, which we call the circular value. Help Danny find the maximum possible circular value after some sequences of operations. The first line contains one odd integer n ( 1 <= q n < 2 cdot 10^5 , n is odd) -- the initial size of the circle. The second line contains n integers a_{1},a_{2}, ... ,a_{n} ( 0 <= q a_{i} <= q 10^9 ) -- the initial numbers in the circle. Output the maximum possible circular value after applying some sequence of operations to the given circle. For the first test case, here's how a circular value of 17 is obtained: Pick the number at index 3 . The sum of adjacent elements equals 17 . Delete 7 and 10 from the circle and replace 2 with 17 . Note that the answer may not fit in a 32 -bit integer. "...

Tutorials

Codeforces Round #655 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
86588476 daut-dlang D July 11, 2020, 4:57 p.m. OK D TESTS 76 93 18227200 2100
86597856 Gassa D July 11, 2020, 7:02 p.m. OK D TESTS 77 108 28672000 2100
86596961 ruban D July 11, 2020, 6:50 p.m. OK Delphi TESTS 77 93 49459200 2100
86567544 Tom66 D July 11, 2020, 4:01 p.m. OK GNU C++11 TESTS 76 31 6963200 2100
86616243 Werner_Yin D July 12, 2020, 3:49 a.m. OK GNU C++11 TESTS 79 31 7065600 2100
86588069 dutouyvluori D July 11, 2020, 4:56 p.m. OK GNU C++11 TESTS 76 31 11161600 2100
86572734 chenshi028 D July 11, 2020, 4:12 p.m. OK GNU C++11 TESTS 76 46 5324800 2100
86561311 jhknmj D July 11, 2020, 3:51 p.m. OK GNU C++11 TESTS 76 46 5529600 2100
86576697 wxg D July 11, 2020, 4:23 p.m. OK GNU C++11 TESTS 76 46 6348800 2100
86617716 suxxsfe D July 12, 2020, 4:22 a.m. OK GNU C++11 TESTS 79 46 7065600 2100
86567950 LxRBS D July 11, 2020, 4:02 p.m. OK GNU C++11 TESTS 76 46 7065600 2100
86611495 Frame233 D July 12, 2020, 1:48 a.m. OK GNU C++11 TESTS 78 46 7884800 2100
86582110 smsylby D July 11, 2020, 4:38 p.m. OK GNU C++11 TESTS 76 46 8499200 2100
86556286 Hyperbolic D July 11, 2020, 3:44 p.m. OK GNU C++14 TESTS 76 62 6963200 2100
86579934 maijing D July 11, 2020, 4:32 p.m. OK GNU C++14 TESTS 76 62 8806400 2100
86594168 jeaf_dean D July 11, 2020, 6:23 p.m. OK GNU C++14 TESTS 76 77 4505600 2100
86617477 rakeshcodeit D July 12, 2020, 4:17 a.m. OK GNU C++14 TESTS 79 77 5324800 2100
86607010 philly12399 D July 11, 2020, 10:35 p.m. OK GNU C++14 TESTS 78 77 5324800 2100
86602613 anshuman10398 D July 11, 2020, 8:20 p.m. OK GNU C++14 TESTS 77 77 6963200 2100
86595069 TheLethalCode D July 11, 2020, 6:31 p.m. OK GNU C++14 TESTS 76 77 6963200 2100
86565195 parkpkww D July 11, 2020, 3:57 p.m. OK GNU C++14 TESTS 76 77 6963200 2100
86620056 taskmasteR252 D July 12, 2020, 5:06 a.m. OK GNU C++14 TESTS 79 77 7782400 2100
86616594 detergent D July 12, 2020, 3:57 a.m. OK GNU C++14 TESTS 79 77 7782400 2100

remove filters

Back to search problems