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 |
1637
|
Codeforces Global Round 19 |
FINISHED |
False |
9000 |
92503463 |
Feb. 12, 2022, 2:35 p.m. |
Problems
B"You are given a tree with n vertices numbered from 1 to n . The height of the i -th vertex is h_i . You can place any number of towers into vertices, for each tower you can choose which vertex to put it in, as well as choose its efficiency. Setting up a tower with efficiency e costs e coins, where e > 0 . It is considered that a vertex x gets a signal if for some pair of towers at the vertices u and v ( u neq v , but it is allowed that x = u or x = v ) with efficiencies e_u and e_v , respectively, it is satisfied that min(e_u, e_v) geq h_x and x lies on the path between u and v . Find the minimum number of coins required to set up towers so that you can get a signal at all vertices. The first line contains an integer n ( 2 <= n <= 200 ,000 ) -- the number of vertices in the tree. The second line contains n integers h_i ( 1 <= h_i <= 10^9 ) -- the heights of the vertices. Each of the next n - 1 lines contain a pair of numbers v_i, u_i ( 1 <= v_i, u_i <= n ) -- an edge of the tree. It is guaranteed that the given edges form a tree. Print one integer -- the minimum required number of coins. In the first test case it's optimal to install two towers with efficiencies 2 at vertices 1 and 3 . In the second test case it's optimal to install a tower with efficiency 1 at vertex 1 and two towers with efficiencies 3 at vertices 2 and 5 . In the third test case it's optimal to install two towers with efficiencies 6 at vertices 1 and 2 . "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
146152212 |
ljc1301 |
F |
Feb. 12, 2022, 5:01 p.m. |
OK |
GNU C++14 |
TESTS |
123 |
187 |
7372800 |
|
|
146185709 |
WHC-MIK-7521X |
F |
Feb. 13, 2022, 2:15 a.m. |
OK |
GNU C++14 |
TESTS |
124 |
202 |
7782400 |
|
|
146185870 |
black_trees |
F |
Feb. 13, 2022, 2:18 a.m. |
OK |
GNU C++14 |
TESTS |
124 |
202 |
13004800 |
|
|
146189304 |
black_trees |
F |
Feb. 13, 2022, 3:37 a.m. |
OK |
GNU C++14 |
TESTS |
125 |
217 |
18022400 |
|
|
146187386 |
L7-56 |
F |
Feb. 13, 2022, 2:55 a.m. |
OK |
GNU C++14 |
TESTS |
124 |
218 |
9830400 |
|
|
146187049 |
L7-56 |
F |
Feb. 13, 2022, 2:47 a.m. |
OK |
GNU C++14 |
TESTS |
124 |
218 |
9830400 |
|
|
146157040 |
CWB_the_most_powerful |
F |
Feb. 12, 2022, 6 p.m. |
OK |
GNU C++14 |
TESTS |
123 |
218 |
10035200 |
|
|
146176300 |
apostoldaniel854 |
F |
Feb. 12, 2022, 9:54 p.m. |
OK |
GNU C++14 |
TESTS |
123 |
233 |
7680000 |
|
|
146184812 |
wrpwrp |
F |
Feb. 13, 2022, 1:53 a.m. |
OK |
GNU C++14 |
TESTS |
124 |
233 |
7680000 |
|
|
146186713 |
moonrise__ |
F |
Feb. 13, 2022, 2:39 a.m. |
OK |
GNU C++14 |
TESTS |
124 |
233 |
12902400 |
|
|
146153356 |
fallleaves01 |
F |
Feb. 12, 2022, 5:04 p.m. |
OK |
GNU C++17 |
TESTS |
123 |
140 |
10649600 |
|
|
146169493 |
quanshr |
F |
Feb. 12, 2022, 7:59 p.m. |
OK |
GNU C++17 |
TESTS |
123 |
156 |
5734400 |
|
|
146149847 |
Baiyu0123 |
F |
Feb. 12, 2022, 4:56 p.m. |
OK |
GNU C++17 |
TESTS |
123 |
171 |
41676800 |
|
|
146185330 |
hotwords |
F |
Feb. 13, 2022, 2:06 a.m. |
OK |
GNU C++17 |
TESTS |
124 |
202 |
4915200 |
|
|
146180066 |
YxqK |
F |
Feb. 12, 2022, 11:36 p.m. |
OK |
GNU C++17 |
TESTS |
123 |
218 |
7680000 |
|
|
146168998 |
vishnugupta123 |
F |
Feb. 12, 2022, 7:53 p.m. |
OK |
GNU C++17 |
TESTS |
123 |
233 |
12185600 |
|
|
146198164 |
RoundRoundUP |
F |
Feb. 13, 2022, 5:52 a.m. |
OK |
GNU C++17 |
TESTS |
125 |
233 |
16998400 |
|
|
146186944 |
Kirito |
F |
Feb. 13, 2022, 2:45 a.m. |
OK |
GNU C++17 |
TESTS |
124 |
234 |
11673600 |
|
|
146164133 |
rui-de |
F |
Feb. 12, 2022, 6:54 p.m. |
OK |
GNU C++17 |
TESTS |
123 |
249 |
7680000 |
|
|
146186171 |
Solstice |
F |
Feb. 13, 2022, 2:25 a.m. |
OK |
GNU C++17 |
TESTS |
124 |
249 |
7680000 |
|
|
146183302 |
wcdr |
F |
Feb. 13, 2022, 1:12 a.m. |
OK |
GNU C++17 (64) |
TESTS |
123 |
62 |
8601600 |
|
|
146183744 |
basic_string |
F |
Feb. 13, 2022, 1:24 a.m. |
OK |
GNU C++17 (64) |
TESTS |
123 |
187 |
12800000 |
|
|
146157279 |
ecnerwala |
F |
Feb. 12, 2022, 6:01 p.m. |
OK |
GNU C++17 (64) |
TESTS |
123 |
202 |
10137600 |
|
|
146170313 |
kpw29 |
F |
Feb. 12, 2022, 8:11 p.m. |
OK |
GNU C++17 (64) |
TESTS |
123 |
202 |
10240000 |
|
|
146163672 |
emthrm |
F |
Feb. 12, 2022, 6:49 p.m. |
OK |
GNU C++17 (64) |
TESTS |
123 |
202 |
12083200 |
|
|
146159937 |
DerKleinUbermensch |
F |
Feb. 12, 2022, 6:16 p.m. |
OK |
GNU C++17 (64) |
TESTS |
123 |
202 |
14233600 |
|
|
146181948 |
xyf007 |
F |
Feb. 13, 2022, 12:33 a.m. |
OK |
GNU C++17 (64) |
TESTS |
123 |
202 |
17510400 |
|
|
146192769 |
shiven |
F |
Feb. 13, 2022, 4:38 a.m. |
OK |
GNU C++17 (64) |
TESTS |
125 |
202 |
25702400 |
|
|
146146909 |
lessmeaning |
F |
Feb. 12, 2022, 4:48 p.m. |
OK |
GNU C++17 (64) |
TESTS |
123 |
217 |
20275200 |
|
|
146176361 |
Ronnie007 |
F |
Feb. 12, 2022, 9:55 p.m. |
OK |
GNU C++17 (64) |
TESTS |
123 |
218 |
12800000 |
|
|
146147657 |
Neal_lee |
F |
Feb. 12, 2022, 4:50 p.m. |
OK |
GNU C++20 (64) |
TESTS |
123 |
109 |
5222400 |
|
|
146163895 |
Warawreh |
F |
Feb. 12, 2022, 6:51 p.m. |
OK |
GNU C++20 (64) |
TESTS |
123 |
171 |
10240000 |
|
|
146178448 |
BalintR |
F |
Feb. 12, 2022, 10:48 p.m. |
OK |
GNU C++20 (64) |
TESTS |
123 |
171 |
11059200 |
|
|
146170976 |
Ormlis |
F |
Feb. 12, 2022, 8:21 p.m. |
OK |
GNU C++20 (64) |
TESTS |
123 |
171 |
12083200 |
|
|
146157186 |
ALILILILILI-KHAN |
F |
Feb. 12, 2022, 6:01 p.m. |
OK |
GNU C++20 (64) |
TESTS |
123 |
171 |
12800000 |
|
|
146159528 |
LeoPro |
F |
Feb. 12, 2022, 6:13 p.m. |
OK |
GNU C++20 (64) |
TESTS |
123 |
171 |
15155200 |
|
|
146191753 |
Fysty |
F |
Feb. 13, 2022, 4:22 a.m. |
OK |
GNU C++20 (64) |
TESTS |
125 |
171 |
24064000 |
|
|
146161113 |
Linkus |
F |
Feb. 12, 2022, 6:25 p.m. |
OK |
GNU C++20 (64) |
TESTS |
123 |
171 |
36556800 |
|
|
146180902 |
Thallium54 |
F |
Feb. 13, 2022, 12:03 a.m. |
OK |
GNU C++20 (64) |
TESTS |
123 |
186 |
10035200 |
|
|
146185213 |
Meul |
F |
Feb. 13, 2022, 2:03 a.m. |
OK |
GNU C++20 (64) |
TESTS |
124 |
186 |
12595200 |
|
|
146149059 |
SecondThread |
F |
Feb. 12, 2022, 4:54 p.m. |
OK |
Java 8 |
TESTS |
123 |
577 |
89292800 |
|
|
146148390 |
mban259 |
F |
Feb. 12, 2022, 4:52 p.m. |
OK |
.NET Core C# |
TESTS |
123 |
296 |
36556800 |
|
|
146170688 |
OLOGY |
F |
Feb. 12, 2022, 8:16 p.m. |
OK |
PyPy 2 |
TESTS |
123 |
514 |
42496000 |
|
|
146170315 |
SPD_9X2 |
F |
Feb. 12, 2022, 8:11 p.m. |
OK |
PyPy 3 |
TESTS |
123 |
982 |
39321600 |
|
|
146190472 |
whatshisbucket |
F |
Feb. 13, 2022, 3:59 a.m. |
OK |
PyPy 3 |
TESTS |
125 |
1169 |
40243200 |
|
|
146190273 |
whatshisbucket |
F |
Feb. 13, 2022, 3:55 a.m. |
OK |
PyPy 3 |
TESTS |
125 |
1185 |
40345600 |
|
|
146189472 |
whatshisbucket |
F |
Feb. 13, 2022, 3:40 a.m. |
OK |
PyPy 3 |
TESTS |
125 |
1262 |
34099200 |
|
|
146152258 |
bpdolson |
F |
Feb. 12, 2022, 5:01 p.m. |
OK |
PyPy 3-64 |
TESTS |
123 |
889 |
76288000 |
|
|
146166664 |
Hdk2127 |
F |
Feb. 12, 2022, 7:24 p.m. |
OK |
PyPy 3-64 |
TESTS |
123 |
1434 |
91340800 |
|
|
146157377 |
aberent |
F |
Feb. 12, 2022, 6:01 p.m. |
OK |
PyPy 3-64 |
TESTS |
123 |
1497 |
134656000 |
|
|
146170705 |
OLOGY |
F |
Feb. 12, 2022, 8:17 p.m. |
OK |
Python 2 |
TESTS |
123 |
1029 |
42393600 |
|
|
146172169 |
OLOGY |
F |
Feb. 12, 2022, 8:40 p.m. |
OK |
Python 2 |
TESTS |
123 |
1372 |
34099200 |
|
|
146159733 |
clause |
F |
Feb. 12, 2022, 6:14 p.m. |
OK |
Rust 2021 |
TESTS |
123 |
327 |
21401600 |
|
|
remove filters
Back to search problems