CodeTON Round 5 (Div. 1 + Div. 2, Rated, Prizes!)

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
1842 CodeTON Round 5 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 10800 49650863 June 24, 2023, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 125 ) I Tenzing and Necklace PROGRAMMING divide and conquer dp greedy

B'Tenzing has a beautiful necklace. The necklace consists of n pearls numbered from 1 to n with a string connecting pearls i and (i text{ mod } n)+1 for all 1 <= q i <= q n . One day Tenzing wants to cut the necklace into several parts by cutting some strings. But for each connected part of the necklace, there should not be more than k pearls. The time needed to cut each string may not be the same. Tenzing needs to spend a_i minutes cutting the string between pearls i and (i text{ mod } n)+1 . Tenzing wants to know the minimum time in minutes to cut the necklace such that each connected part will not have more than k pearls. Each test contains multiple test cases. The first line of input contains a single integer t ( 1 <= t <= 10^5 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains two integers n and k ( 2 <= q n <= q 5 cdot 10^5 , 1 <= q k <n ). The second line of each test case contains n integers a_1,a_2, ldots,a_n ( 1 <= q a_i <= q 10^9 ). It is guaranteed that the sum of n of all test cases does not exceed 5 cdot 10^5 . For each test case, output the minimum total time in minutes required. In the first test case, the necklace will be cut into 3 parts: [1,2][3,4][5] , so the total time is 3 . In the second test case, the necklace will be cut into 3 parts: [5,1][2][3,4] , Tenzing will cut the strings connecting (1,2), (2,3) and (4,5) , so the total time is a_1+a_2+a_4=7 . '...

Tutorials

CodeTON Round 5 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
210957374 HuTao_Oya_OyaOya I June 24, 2023, 6:24 p.m. OK GNU C++17 TESTS 212 1060 74649600
210978043 ALSAHORE I June 25, 2023, 12:06 a.m. OK GNU C++17 (64) TESTS 212 717 81612800
210962012 div2halyva I June 24, 2023, 7:12 p.m. OK GNU C++17 (64) TESTS 212 717 81612800
210958749 pspvr I June 24, 2023, 6:37 p.m. OK GNU C++20 (64) TESTS 212 701 81817600
210953525 maroonrk I June 24, 2023, 5:58 p.m. OK GNU C++20 (64) TESTS 212 733 81817600
210989802 flowerletter I June 25, 2023, 5 a.m. OK GNU C++20 (64) TESTS 212 1372 426086400
210987826 KbltQaQ I June 25, 2023, 4:18 a.m. OK GNU C++20 (64) TESTS 212 1404 240947200
210986741 Benq I June 25, 2023, 3:56 a.m. OK GNU C++20 (64) TESTS 212 1949 32665600
210985708 Benq I June 25, 2023, 3:31 a.m. OK GNU C++20 (64) TESTS 212 1981 32358400

remove filters

Back to search problems