Codeforces Round 856 (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
1794 Codeforces Round 856 (Div. 2) FINISHED False 7200 53871899 March 4, 2023, 5:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14111 ) C Scoring Subsequences PROGRAMMING binary search greedy math two pointers

B'The score of a sequence [s_1, s_2, ldots, s_d] is defined as displaystyle frac{s_1 cdot s_2 cdot ldots cdot s_d}{d!} , where d!=1 cdot 2 cdot ldots cdot d . In particular, the score of an empty sequence is 1 . For a sequence [s_1, s_2, ldots, s_d] , let m be the maximum score among all its subsequences. Its cost is defined as the maximum length of a subsequence with a score of m . You are given a non-decreasing sequence [a_1, a_2, ldots, a_n] of integers of length n . In other words, the condition a_1 <= q a_2 <= q ldots <= q a_n is satisfied. For each k=1, 2, ldots , n , find the cost of the sequence [a_1, a_2, ldots , a_k] . A sequence x is a subsequence of a sequence y if x can be obtained from y by deletion of several (possibly, zero or all) elements. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). The description of the test cases follows. The first line of each test case contains an integer n ( 1 <= n <= 10^5 ) -- the length of the given sequence. The second line of each test case contains n integers a_1,a_2, ldots,a_n ( 1 <= a_i <= q n ) -- the given sequence. It is guaranteed that its elements are in non-decreasing order. It is guaranteed that the sum of n over all test cases does not exceed 5 cdot 10^5 . For each test case, output n integers -- the costs of sequences [a_1, a_2, ldots , a_k] in ascending order of k . In the first test case: '...

Tutorials

Codeforces Round 856 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
196052196 LeonidR C March 4, 2023, 7:23 p.m. OK C# 10 TESTS 28 187 25088000
196042819 royaparannha C March 4, 2023, 6:54 p.m. OK C# 10 TESTS 28 1544 27648000
196049915 NenadDapic C March 4, 2023, 7:16 p.m. OK FPC TESTS 28 1497 409600
196044129 baap_coder17 C March 4, 2023, 6:58 p.m. OK GNU C++14 TESTS 28 171 614400
196058523 AlvaroLG C March 4, 2023, 8:13 p.m. OK GNU C++14 TESTS 28 171 1228800
196048289 iamattri0001 C March 4, 2023, 7:11 p.m. OK GNU C++14 TESTS 28 171 1536000
196048612 akashshridharan2802 C March 4, 2023, 7:12 p.m. OK GNU C++14 TESTS 28 186 1433600
196043595 ok_code C March 4, 2023, 6:56 p.m. OK GNU C++14 TESTS 28 186 1740800
196051306 shivanshabhi77 C March 4, 2023, 7:20 p.m. OK GNU C++14 TESTS 28 186 1945600
196058606 Sharwan987 C March 4, 2023, 8:13 p.m. OK GNU C++14 TESTS 28 186 2867200
196075097 bestzzz C March 5, 2023, 12:37 a.m. OK GNU C++14 TESTS 28 187 409600
196074919 sacave C March 5, 2023, 12:30 a.m. OK GNU C++14 TESTS 28 187 409600
196073478 awoo C March 4, 2023, 11:41 p.m. OK GNU C++14 TESTS 28 187 409600

remove filters

Back to search problems