Codeforces Round 664 (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
1394 Codeforces Round 664 (Div. 1) FINISHED False 7200 134580299 Aug. 12, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 148 ) E Boboniu and Banknote Collection PROGRAMMING 3500

B"No matter what trouble you're in, don't be afraid, but face it with a smile. I've made another billion dollars! -- Boboniu Boboniu has issued his currencies, named Bobo Yuan. Bobo Yuan (BBY) is a series of currencies. Boboniu gives each of them a positive integer identifier, such as BBY-1, BBY-2, etc. Boboniu has a BBY collection. His collection looks like a sequence. For example: We can use sequence a=[1,2,3,3,2,1,4,4,1] of length n=9 to denote it. Now Boboniu wants to fold his collection. You can imagine that Boboniu stick his collection to a long piece of paper and fold it between currencies: Boboniu will only fold the same identifier of currencies together. In other words, if a_i is folded over a_j ( 1 <= i,j <= n ), then a_i=a_j must hold. Boboniu doesn't care if you follow this rule in the process of folding. But once it is finished, the rule should be obeyed. A formal definition of fold is described in notes. According to the picture above, you can fold a two times. In fact, you can fold a=[1,2,3,3,2,1,4,4,1] at most two times. So the maximum number of folds of it is 2 . As an international fan of Boboniu, you're asked to calculate the maximum number of folds. You're given a sequence a of length n , for each i ( 1 <= i <= n ), you need to calculate the maximum number of folds of [a_1,a_2, ldots,a_i] . The first line contains an integer n ( 1 <= n <= 10^5 ). The second line contains n integers a_1,a_2, ldots,a_n ( 1 <= a_i <= n ). Print n integers. The i -th of them should be equal to the maximum number of folds of [a_1,a_2, ldots,a_i] . Formally, for a sequence a of length n , let's define the folding sequence as a sequence b of length n such that: ( [A] is the value of boolean expression A . i. e. [A]=1 if A is true, else [A]=0 ). Now we define the number of folds of b as "...

Tutorials

Codeforces Round #664 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
91529018 gongsuidashen E Sept. 1, 2020, 12:42 a.m. OK GNU C++11 TESTS 73 93 5939200 3500
89768465 willardsun E Aug. 13, 2020, 6:56 a.m. OK GNU C++11 TESTS 73 124 5222400 3500
90523132 enigma_13 E Aug. 21, 2020, 10:27 a.m. OK GNU C++11 TESTS 73 124 9830400 3500
90752694 RainAir E Aug. 23, 2020, noon OK GNU C++11 TESTS 73 217 9420800 3500
90002774 bimbat_yuri E Aug. 15, 2020, 8:45 a.m. OK GNU C++14 TESTS 73 93 6041600 3500
91289613 AdityA2299 E Aug. 29, 2020, 1:56 p.m. OK GNU C++14 TESTS 73 108 6144000 3500
91695847 Rafi_2235 E Sept. 3, 2020, 7:21 a.m. OK GNU C++14 TESTS 73 109 6041600 3500
89859691 krijgertje E Aug. 14, 2020, 9:56 a.m. OK GNU C++14 TESTS 73 217 8396800 3500
89768277 SpongeCodes E Aug. 13, 2020, 6:54 a.m. OK GNU C++17 TESTS 73 77 5427200 3500
91577584 Nakagawa.Kanon E Sept. 1, 2020, 3:07 p.m. OK GNU C++17 TESTS 73 78 2150400 3500
91223030 CasarinFilippo E Aug. 28, 2020, 3:33 p.m. OK GNU C++17 TESTS 73 93 8089600 3500
91572251 Shekh_Ashraful E Sept. 1, 2020, 2:06 p.m. OK GNU C++17 TESTS 73 108 6144000 3500
89745226 spartan_sj E Aug. 12, 2020, 9:24 p.m. OK GNU C++17 TESTS 73 108 6144000 3500
90699848 duock28cbg E Aug. 22, 2020, 3:33 p.m. OK GNU C++17 TESTS 73 109 9830400 3500
90294852 jiangly E Aug. 18, 2020, 9:35 a.m. OK GNU C++17 TESTS 73 218 6041600 3500
89843399 I_Love_Tourist_ E Aug. 14, 2020, 5:31 a.m. OK GNU C++17 TESTS 73 218 7987200 3500
89830949 ainta E Aug. 13, 2020, 11:27 p.m. OK GNU C++17 TESTS 73 218 7987200 3500
89997125 Tikhon228 E Aug. 15, 2020, 7:32 a.m. OK GNU C++17 (64) TESTS 73 46 3174400 3500
89998011 Tikhon228 E Aug. 15, 2020, 7:44 a.m. OK GNU C++17 (64) TESTS 73 61 3481600 3500
89751306 ecnerwala E Aug. 13, 2020, 1:21 a.m. OK GNU C++17 (64) TESTS 73 61 5632000 3500
89751614 ecnerwala E Aug. 13, 2020, 1:30 a.m. OK GNU C++17 (64) TESTS 73 62 6758400 3500
89738268 Benq E Aug. 12, 2020, 7 p.m. OK GNU C++17 (64) TESTS 73 108 11673600 3500
90626488 rqi E Aug. 21, 2020, 6:02 p.m. OK GNU C++17 (64) TESTS 73 202 11980800 3500
89748113 ecnerwala E Aug. 12, 2020, 11:07 p.m. OK GNU C++17 (64) TESTS 73 966 3788800 3500

remove filters

Back to search problems