Codeforces Round 768 (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
1630 Codeforces Round 768 (Div. 1) FINISHED False 7200 93885863 Jan. 27, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2989 ) C Paint the Middle PROGRAMMING data structures dp greedy sortings

B'You are given n elements numbered from 1 to n , the element i has value a_i and color c_i , initially, c_i = 0 for all i . The following operation can be applied: Find the maximum value of sum limits_{i=1}^n{c_i} that can be obtained after applying the given operation any number of times. The first line contains an integer n ( 3 <= q n <= q 2 cdot 10^5 ) -- the number of elements. The second line consists of n integers a_1, a_2, ... , a_n ( 1 <= q a_i <= q n ), where a_i is the value of the i -th element. Print a single integer in a line -- the maximum value of sum limits_{i=1}^n{c_i} that can be obtained after applying the given operation any number of times. In the first test, it is possible to apply the following operations in order: '...

Tutorials

Editorial of Codeforces Round #768

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
144238327 Sigma-Sagittarius C Jan. 27, 2022, 4:14 p.m. OK FPC TESTS 42 62 3993600
144243878 TanKuku C Jan. 27, 2022, 4:26 p.m. OK GNU C++14 TESTS 42 15 40448000
144246954 scli_weapon C Jan. 27, 2022, 4:32 p.m. OK GNU C++14 TESTS 42 46 3276800
144227188 LWLAymh C Jan. 27, 2022, 3:51 p.m. OK GNU C++14 TESTS 42 46 3379200
144228081 Timsei C Jan. 27, 2022, 3:53 p.m. OK GNU C++14 TESTS 42 46 21606400
144272550 xxxxx250 C Jan. 28, 2022, 2:04 a.m. OK GNU C++14 TESTS 42 61 1638400
144218090 Lomer C Jan. 27, 2022, 3:35 p.m. OK GNU C++14 TESTS 42 61 1843200
144247709 hyta4982 C Jan. 27, 2022, 4:33 p.m. OK GNU C++14 TESTS 42 61 3174400
144211631 gzchenben C Jan. 27, 2022, 3:24 p.m. OK GNU C++14 TESTS 42 62 1536000
144228601 zhaotiensn C Jan. 27, 2022, 3:53 p.m. OK GNU C++14 TESTS 42 62 1638400
144217679 Rainbow____ C Jan. 27, 2022, 3:34 p.m. OK GNU C++14 TESTS 42 62 1638400
144217411 fallleaves01 C Jan. 27, 2022, 3:34 p.m. OK GNU C++17 TESTS 42 31 5734400
144232195 CE_WA_TLE C Jan. 27, 2022, 4:01 p.m. OK GNU C++17 TESTS 42 31 30310400
144280303 stevenzhang C Jan. 28, 2022, 4:38 a.m. OK GNU C++17 TESTS 42 46 2457600
144211707 Icecream2001 C Jan. 27, 2022, 3:25 p.m. OK GNU C++17 TESTS 42 46 2662400
144218181 zemen C Jan. 27, 2022, 3:35 p.m. OK GNU C++17 TESTS 42 61 1638400
144240342 snuphy C Jan. 27, 2022, 4:18 p.m. OK GNU C++17 TESTS 42 61 2662400
144243225 icemage C Jan. 27, 2022, 4:24 p.m. OK GNU C++17 TESTS 42 61 3174400
144241640 acwing_choufeng C Jan. 27, 2022, 4:21 p.m. OK GNU C++17 TESTS 42 61 3993600
144213404 lyons C Jan. 27, 2022, 3:27 p.m. OK GNU C++17 TESTS 42 61 4812800
144267258 stevancv C Jan. 27, 2022, 10:13 p.m. OK GNU C++17 TESTS 42 62 1638400
144206427 fengchang C Jan. 27, 2022, 3:17 p.m. OK GNU C++17 (64) TESTS 42 15 5222400
144198045 QAQAutoMaton C Jan. 27, 2022, 3:06 p.m. OK GNU C++17 (64) TESTS 42 15 6656000
144267724 GoatTamer C Jan. 27, 2022, 10:31 p.m. OK GNU C++17 (64) TESTS 42 31 1638400
144209487 icecuber C Jan. 27, 2022, 3:21 p.m. OK GNU C++17 (64) TESTS 42 31 1638400
144270254 KKT_89 C Jan. 28, 2022, 12:43 a.m. OK GNU C++17 (64) TESTS 42 46 1638400
144261401 Kude C Jan. 27, 2022, 7:50 p.m. OK GNU C++17 (64) TESTS 42 46 1638400
144255301 ecottea C Jan. 27, 2022, 6:39 p.m. OK GNU C++17 (64) TESTS 42 46 1638400
144239605 Temmie C Jan. 27, 2022, 4:16 p.m. OK GNU C++17 (64) TESTS 42 46 1638400
144225562 froggyzhang C Jan. 27, 2022, 3:48 p.m. OK GNU C++17 (64) TESTS 42 46 1638400
144221696 dfcmd C Jan. 27, 2022, 3:41 p.m. OK GNU C++17 (64) TESTS 42 46 1638400
144266223 FelixArg C Jan. 27, 2022, 9:37 p.m. OK GNU C++20 (64) TESTS 42 31 1638400
144259165 JocalAreaNetwork C Jan. 27, 2022, 7:19 p.m. OK GNU C++20 (64) TESTS 42 31 1638400
144256509 jyothirmai01 C Jan. 27, 2022, 6:51 p.m. OK GNU C++20 (64) TESTS 42 31 1638400
144254770 Nea1 C Jan. 27, 2022, 6:35 p.m. OK GNU C++20 (64) TESTS 42 31 1638400
144231814 erray C Jan. 27, 2022, 4 p.m. OK GNU C++20 (64) TESTS 42 31 1638400
144225123 Linkus C Jan. 27, 2022, 3:47 p.m. OK GNU C++20 (64) TESTS 42 31 1638400
144205766 antekb C Jan. 27, 2022, 3:16 p.m. OK GNU C++20 (64) TESTS 42 31 1638400
144202588 BalintR C Jan. 27, 2022, 3:12 p.m. OK GNU C++20 (64) TESTS 42 31 1638400
144264672 tiasmondal C Jan. 27, 2022, 8:55 p.m. OK GNU C++20 (64) TESTS 42 31 2457600
144263869 Soumya1 C Jan. 27, 2022, 8:37 p.m. OK GNU C++20 (64) TESTS 42 31 2457600
144262134 0x3F C Jan. 27, 2022, 8:03 p.m. OK Go TESTS 42 124 3174400
144218699 clyring C Jan. 27, 2022, 3:36 p.m. OK Haskell TESTS 42 77 6348800
144239179 derrick20 C Jan. 27, 2022, 4:16 p.m. OK Java 11 TESTS 42 202 0
144268633 barkat03 C Jan. 27, 2022, 11:19 p.m. OK Java 11 TESTS 42 218 0
144266559 martins C Jan. 27, 2022, 9:48 p.m. OK Java 11 TESTS 42 233 0
144240357 Mathematiker C Jan. 27, 2022, 4:18 p.m. OK Java 11 TESTS 42 498 5324800
144255198 TheOG C Jan. 27, 2022, 6:38 p.m. OK Java 11 TESTS 42 701 13414400
144240840 iakovlev.zakhar C Jan. 27, 2022, 4:19 p.m. OK Java 8 TESTS 42 140 7372800
144254986 YahiaSherif C Jan. 27, 2022, 6:36 p.m. OK Java 8 TESTS 42 249 7782400
144233065 fetetriste C Jan. 27, 2022, 4:02 p.m. OK Java 8 TESTS 42 311 25804800
144232282 Sparky_Master_WCH1226 C Jan. 27, 2022, 4:01 p.m. OK Kotlin 1.4 TESTS 42 139 0
144263808 Hakiobo C Jan. 27, 2022, 8:36 p.m. OK Kotlin 1.4 TESTS 42 140 0
144230490 ComPhyPark C Jan. 27, 2022, 3:57 p.m. OK MS C++ 2017 TESTS 42 78 5734400
144255705 FlakeLCR C Jan. 27, 2022, 6:43 p.m. OK PyPy 3 TESTS 42 155 18432000
144199913 conqueror_of_tourist C Jan. 27, 2022, 3:08 p.m. OK PyPy 3 TESTS 42 280 16486400
144238563 titia C Jan. 27, 2022, 4:14 p.m. OK PyPy 3 TESTS 42 326 29491200
144254763 NecroSean38 C Jan. 27, 2022, 6:35 p.m. OK PyPy 3 TESTS 42 467 22118400
144212423 whatshisbucket C Jan. 27, 2022, 3:26 p.m. OK PyPy 3 TESTS 42 530 22323200
144257262 SPD_9X2 C Jan. 27, 2022, 6:58 p.m. OK PyPy 3 TESTS 42 530 56832000
144234775 Slamur C Jan. 27, 2022, 4:06 p.m. OK PyPy 3-64 TESTS 42 249 23347200
144262260 OLOGY C Jan. 27, 2022, 8:05 p.m. OK Python 2 TESTS 42 217 16588800
144201949 Egor C Jan. 27, 2022, 3:11 p.m. OK Rust 2021 TESTS 42 31 3174400
144206538 sansen C Jan. 27, 2022, 3:17 p.m. OK Rust 2021 TESTS 42 31 6348800

remove filters

Back to search problems