Codeforces Round 699 (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
1481 Codeforces Round 699 (Div. 2) FINISHED False 7200 124817110 Feb. 5, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2167 ) E Sorting Books PROGRAMMING data structures dp greedy

B"One day you wanted to read something, so you went to your bookshelf to grab some book. But when you saw how messy the bookshelf was you decided to clean it up first. There are n books standing in a row on the shelf, the i -th book has color a_i . You'd like to rearrange the books to make the shelf look beautiful. The shelf is considered beautiful if all books of the same color are next to each other. In one operation you can take one book from any position on the shelf and move it to the right end of the shelf. What is the minimum number of operations you need to make the shelf beautiful? The first line contains one integer n ( 1 <= n <= 5 cdot 10^5 ) -- the number of books. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ) -- the book colors. Output the minimum number of operations to make the shelf beautiful. In the first example, we have the bookshelf [1, 2, 2, 1, 3] and can, for example: In the second example, we can move the first book to the end of the bookshelf and get [2,2,1,1,1] . "...

Tutorials

Codeforces Round #699 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
106643454 rlblaster E Feb. 6, 2021, 5:16 a.m. OK GNU C11 TESTS 36 109 10240000
106626664 rainboy E Feb. 5, 2021, 8:46 p.m. OK GNU C11 TESTS 36 124 10035200
106640552 hangyesheng E Feb. 6, 2021, 4:20 a.m. OK GNU C++11 TESTS 36 46 10035200
106633192 leapfrog E Feb. 6, 2021, 12:52 a.m. OK GNU C++11 TESTS 36 46 11980800
106631908 Mr_Eight E Feb. 6, 2021, 12:03 a.m. OK GNU C++11 TESTS 36 46 11980800
106607532 tommy0I03 E Feb. 5, 2021, 4:34 p.m. OK GNU C++11 TESTS 36 46 11980800
106633750 sky123 E Feb. 6, 2021, 1:13 a.m. OK GNU C++11 TESTS 36 46 11980800
106633864 Ithea E Feb. 6, 2021, 1:17 a.m. OK GNU C++11 TESTS 36 46 11980800
106613918 jsssk E Feb. 5, 2021, 5:41 p.m. OK GNU C++11 TESTS 36 46 12083200
106634332 comld E Feb. 6, 2021, 1:36 a.m. OK GNU C++11 TESTS 36 46 16076800
106643786 Connected_failed E Feb. 6, 2021, 5:21 a.m. OK GNU C++11 TESTS 36 46 20070400
106634703 bkifhr9 E Feb. 6, 2021, 1:48 a.m. OK GNU C++11 TESTS 36 46 24064000
106604639 luciocf E Feb. 5, 2021, 4:29 p.m. OK GNU C++14 TESTS 36 139 14028800
106640286 Hung912 E Feb. 6, 2021, 4:14 a.m. OK GNU C++14 TESTS 36 140 10035200
106631912 KhaledFarhat E Feb. 6, 2021, 12:03 a.m. OK GNU C++14 TESTS 36 140 12083200
106610024 SuperJ6 E Feb. 5, 2021, 5:17 p.m. OK GNU C++14 TESTS 36 155 10035200
106612216 SuperJ6 E Feb. 5, 2021, 5:28 p.m. OK GNU C++14 TESTS 36 155 10035200
106625943 Zula. E Feb. 5, 2021, 8:28 p.m. OK GNU C++14 TESTS 36 155 12083200
106643248 wzyeustia E Feb. 6, 2021, 5:13 a.m. OK GNU C++14 TESTS 36 155 28057600
106628075 Nihad_Nabelsi E Feb. 5, 2021, 9:30 p.m. OK GNU C++14 TESTS 36 155 35635200
106608310 dori E Feb. 5, 2021, 4:34 p.m. OK GNU C++14 TESTS 36 156 11980800
106628670 Mamedov E Feb. 5, 2021, 9:51 p.m. OK GNU C++14 TESTS 36 156 12083200
106632866 CQXYM E Feb. 6, 2021, 12:39 a.m. OK GNU C++17 TESTS 36 93 10035200
106646208 windy7926778 E Feb. 6, 2021, 5:55 a.m. OK GNU C++17 TESTS 36 108 11980800
106611663 chen_zexing E Feb. 5, 2021, 5:24 p.m. OK GNU C++17 TESTS 36 108 18022400
106617820 idk321 E Feb. 5, 2021, 6:21 p.m. OK GNU C++17 TESTS 36 124 10035200
106617814 Bench0310 E Feb. 5, 2021, 6:21 p.m. OK GNU C++17 TESTS 36 124 10035200
106627695 Andreasyan E Feb. 5, 2021, 9:18 p.m. OK GNU C++17 TESTS 36 124 10035200
106612983 YoungK E Feb. 5, 2021, 5:33 p.m. OK GNU C++17 TESTS 36 124 10035200
106623780 Zap E Feb. 5, 2021, 7:45 p.m. OK GNU C++17 TESTS 36 124 10035200
106634547 He_Ren E Feb. 6, 2021, 1:43 a.m. OK GNU C++17 TESTS 36 124 16076800
106642753 Guaguapi E Feb. 6, 2021, 5:05 a.m. OK GNU C++17 TESTS 36 139 10035200
106639429 Diegogrc E Feb. 6, 2021, 3:56 a.m. OK GNU C++17 (64) TESTS 36 77 10035200
106610184 izlyforever E Feb. 5, 2021, 5:17 p.m. OK GNU C++17 (64) TESTS 36 92 10035200
106627940 Kregor E Feb. 5, 2021, 9:26 p.m. OK GNU C++17 (64) TESTS 36 93 10035200
106642017 tabr E Feb. 6, 2021, 4:50 a.m. OK GNU C++17 (64) TESTS 36 93 10035200
106642514 vioalbert E Feb. 6, 2021, 5:01 a.m. OK GNU C++17 (64) TESTS 36 93 10547200
106607138 Kotoblepass E Feb. 5, 2021, 4:33 p.m. OK GNU C++17 (64) TESTS 36 93 11980800
106646720 rgnerdplayer E Feb. 6, 2021, 6:02 a.m. OK GNU C++17 (64) TESTS 36 93 12083200
106637451 timmyfeng E Feb. 6, 2021, 3:12 a.m. OK GNU C++17 (64) TESTS 36 93 12083200
106615593 L1ngYu233 E Feb. 5, 2021, 5:56 p.m. OK GNU C++17 (64) TESTS 36 93 12083200
106622777 clam E Feb. 5, 2021, 7:29 p.m. OK GNU C++17 (64) TESTS 36 93 20070400
106613137 0x3F E Feb. 5, 2021, 5:34 p.m. OK Go TESTS 36 327 16179200
106612930 0x3F E Feb. 5, 2021, 5:33 p.m. OK Go TESTS 36 327 16281600
106613807 0x3F E Feb. 5, 2021, 5:40 p.m. OK Go TESTS 36 343 16179200
106611269 clyring E Feb. 5, 2021, 5:22 p.m. OK Haskell TESTS 36 826 101990400
106611317 RoadToGlory E Feb. 5, 2021, 5:22 p.m. OK Java 11 TESTS 36 296 15667200
106613729 PetrNguyen E Feb. 5, 2021, 5:39 p.m. OK Java 11 TESTS 36 296 15667200
106617860 dusty.and.rusty E Feb. 5, 2021, 6:21 p.m. OK Java 11 TESTS 36 498 37171200
106610878 Dukkha E Feb. 5, 2021, 5:20 p.m. OK Java 11 TESTS 36 779 9420800
106633453 hu_tao E Feb. 6, 2021, 1:02 a.m. OK Java 8 TESTS 36 202 15769600
106631875 Java E Feb. 6, 2021, 12:01 a.m. OK Java 8 TESTS 36 202 26828800
106629877 polyakoff E Feb. 5, 2021, 10:35 p.m. OK Java 8 TESTS 36 608 75980800
106633776 NatInTheHat E Feb. 6, 2021, 1:14 a.m. OK Java 8 TESTS 36 748 47001600
106619005 shuyefan E Feb. 5, 2021, 6:36 p.m. OK PyPy 3 TESTS 36 295 43110400
106625463 manish.17 E Feb. 5, 2021, 8:17 p.m. OK PyPy 3 TESTS 36 499 52019200
106624473 awoo E Feb. 5, 2021, 7:57 p.m. OK PyPy 3 TESTS 36 514 44851200
106616528 khanter_ E Feb. 5, 2021, 6:06 p.m. OK PyPy 3 TESTS 36 779 58470400
106629439 silvertint E Feb. 5, 2021, 10:17 p.m. OK PyPy 3 TESTS 36 795 51302400
106628586 silvertint E Feb. 5, 2021, 9:48 p.m. OK PyPy 3 TESTS 36 919 63180800
106615318 huikang E Feb. 5, 2021, 5:53 p.m. OK PyPy 3 TESTS 36 1184 75673600

remove filters

Back to search problems