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 |
---|---|---|---|---|---|---|
1810 | CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!) | FINISHED | False | 7200 | 56993062 | March 31, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 587 ) | F | M-tree | PROGRAMMING | data structures |
B'A rooted tree is called good if every vertex of the tree either is a leaf (a vertex with no children) or has exactly m children. For a good tree, each leaf u has a positive integer c_{u} written on it, and we define the value of the leaf as c_{u} + mathrm{dep}_{u} , where mathrm{dep}_{u} represents the number of edges of the path from vertex u to the root (also known as the depth of u ). The value of a good tree is the maximum value of all its leaves. Now, you are given an array of n integers a_{1}, a_{2}, ldots, a_{n} , which are the integers that should be written on the leaves. You need to construct a good tree with n leaves and write the integers from the array a to all the leaves. Formally, you should assign each leaf u an index b_{u} , where b is a permutation of length n , and represent that the integer written on leaf u is c_u = a_{b_{u}} . Under these constraints, you need to minimize the value of the good tree. You have q queries. Each query gives you x , y and changes a_{x} to y , and after that, you should output the minimum value of a good tree based on the current array a . A permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation ( 2 appears twice in the array), and [1,3,4] is also not a permutation ( n=3 but there is 4 in the array). Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Their description follows. The first line contains three integers n , m , and q ( 1 <= n,q <= 2 cdot 10^5 , 2 <= m <= 2 cdot 10^5 , n equiv 1 pmod {m - 1} ) -- the number of the leaves, the constant m , and the number of q'... |
Editorial of CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
200023198 | rainboy | F | March 31, 2023, 5:09 p.m. | OK | GNU C11 | TESTS | 58 | 1138 | 3993600 | ||
200022822 | Potassium | F | March 31, 2023, 5:08 p.m. | OK | GNU C++14 | TESTS | 58 | 701 | 17715200 | ||
200063820 | ix35 | F | April 1, 2023, 2:17 a.m. | OK | GNU C++14 | TESTS | 58 | 748 | 10444800 | ||
200027280 | yasugongshang | F | March 31, 2023, 5:33 p.m. | OK | GNU C++14 | TESTS | 58 | 873 | 44134400 | ||
200026944 | Hongzy | F | March 31, 2023, 5:31 p.m. | OK | GNU C++14 | TESTS | 58 | 1060 | 24064000 | ||
200025355 | jovialll | F | March 31, 2023, 5:21 p.m. | OK | GNU C++14 | TESTS | 58 | 1450 | 46694400 | ||
200040011 | KassiJulgus | F | March 31, 2023, 7:35 p.m. | OK | GNU C++17 | TESTS | 58 | 374 | 5017600 | ||
200054419 | AlexanderL | F | March 31, 2023, 10:32 p.m. | OK | GNU C++17 | TESTS | 58 | 405 | 3174400 | ||
200025772 | cxaphoenix | F | March 31, 2023, 5:23 p.m. | OK | GNU C++17 | TESTS | 58 | 436 | 1740800 | ||
200057762 | patou | F | March 31, 2023, 11:52 p.m. | OK | GNU C++17 | TESTS | 58 | 452 | 8499200 | ||
200041510 | patou | F | March 31, 2023, 7:52 p.m. | OK | GNU C++17 | TESTS | 58 | 499 | 14028800 | ||
200027533 | sd0061 | F | March 31, 2023, 5:35 p.m. | OK | GNU C++17 | TESTS | 58 | 546 | 8089600 | ||
200029213 | KroosTheKeenGlint | F | March 31, 2023, 5:48 p.m. | OK | GNU C++17 | TESTS | 58 | 592 | 9216000 | ||
200069490 | feeder1 | F | April 1, 2023, 3:53 a.m. | OK | GNU C++17 | TESTS | 58 | 654 | 70246400 | ||
200023874 | tokusakurai | F | March 31, 2023, 5:13 p.m. | OK | GNU C++17 | TESTS | 58 | 701 | 20889600 | ||
200021032 | Alon-Tanay | F | March 31, 2023, 5:01 p.m. | OK | GNU C++17 | TESTS | 58 | 702 | 39014400 | ||
200024728 | YocyCraft | F | March 31, 2023, 5:17 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 467 | 18227200 | ||
200022028 | hitonanode | F | March 31, 2023, 5:04 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 608 | 10342400 | ||
200021002 | clam | F | March 31, 2023, 5:01 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 717 | 7475200 | ||
200042958 | sysulby | F | March 31, 2023, 8:08 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 764 | 7680000 | ||
200030344 | Sana | F | March 31, 2023, 5:57 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 779 | 7475200 | ||
200028419 | icecuber | F | March 31, 2023, 5:42 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 794 | 10547200 | ||
200042473 | sysulby | F | March 31, 2023, 8:02 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 795 | 7680000 | ||
200023575 | yaoxh | F | March 31, 2023, 5:11 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 904 | 53043200 | ||
200024556 | dlalswp25 | F | March 31, 2023, 5:16 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 1153 | 13414400 | ||
200078322 | Hritik12 | F | April 1, 2023, 5:44 a.m. | OK | GNU C++17 (64) | TESTS | 58 | 1309 | 13619200 | ||
200026052 | Icecream2001 | F | March 31, 2023, 5:25 p.m. | OK | GNU C++20 (64) | TESTS | 58 | 265 | 104652800 | ||
200065678 | HollwoQ_Pelw | F | April 1, 2023, 2:51 a.m. | OK | GNU C++20 (64) | TESTS | 58 | 311 | 5017600 | ||
200023113 | baluteshih | F | March 31, 2023, 5:09 p.m. | OK | GNU C++20 (64) | TESTS | 58 | 358 | 20889600 | ||
200023890 | Mangooste | F | March 31, 2023, 5:13 p.m. | OK | GNU C++20 (64) | TESTS | 58 | 452 | 10444800 | ||
200035937 | ahmed.gamal007 | F | March 31, 2023, 6:50 p.m. | OK | GNU C++20 (64) | TESTS | 58 | 452 | 12083200 | ||
200018847 | antekb | F | March 31, 2023, 4:34 p.m. | OK | GNU C++20 (64) | TESTS | 58 | 483 | 9216000 | ||
200026296 | maxplus | F | March 31, 2023, 5:27 p.m. | OK | GNU C++20 (64) | TESTS | 58 | 514 | 7475200 | ||
200040485 | Badint | F | March 31, 2023, 7:40 p.m. | OK | GNU C++20 (64) | TESTS | 58 | 530 | 14438400 | ||
200027505 | maxplus | F | March 31, 2023, 5:35 p.m. | OK | GNU C++20 (64) | TESTS | 58 | 546 | 7475200 | ||
200031134 | Tutis | F | March 31, 2023, 6:04 p.m. | OK | GNU C++20 (64) | TESTS | 58 | 576 | 10547200 | ||
200022640 | sansen | F | March 31, 2023, 5:07 p.m. | OK | Rust 2021 | TESTS | 58 | 670 | 20377600 | ||
200024845 | sansen | F | March 31, 2023, 5:18 p.m. | OK | Rust 2021 | TESTS | 58 | 810 | 20377600 | ||
200030289 | sansen | F | March 31, 2023, 5:57 p.m. | OK | Rust 2021 | TESTS | 58 | 811 | 20377600 |
Back to search problems