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 |
---|---|---|---|---|---|---|
1628 | Codeforces Round 767 (Div. 1) | FINISHED | False | 7200 | 94317863 | Jan. 22, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 936 ) | E | Groceries in Meteor Town | PROGRAMMING | data structures trees |
B"Mihai lives in a town where meteor storms are a common problem. It's annoying, because Mihai has to buy groceries sometimes, and getting hit by meteors isn't fun. Therefore, we ask you to find the most dangerous way to buy groceries so that we can trick him to go there. The town has n buildings numbered from 1 to n . Some buildings have roads between them, and there is exactly 1 simple path from any building to any other building. Each road has a certain meteor danger level. The buildings all have grocery stores, but Mihai only cares about the open ones, of course. Initially, all the grocery stores are closed. You are given q queries of three types: The first line contains the two integers n and q ( 2 <= n, q <= 3 cdot 10^5 ). Then follows n - 1 lines, the i -th of which containing the integers u_i , v_i , and w_i ( 1 <= u_i, v_i <= n, enspace 1 <= w_i <= 10^9 ) meaning there is two way road between building u_i and v_i with meteor danger level w_i . It is guaranteed that the given edges form a tree. Then follows q lines, the j -th of which begin with the integer t_j ( 1 <= t_j <= 3 ), meaning the j -th query is of the t_j -th type. If t_j is 1 or 2 the rest of the line contains the integers l_j and r_j ( 1 <= l_j <= r_j <= n ). If t_j is 3 the rest of the line contains the integer x_j ( 1 <= x_j <= n ). For each query of the 3 rd type ( t_j = 3 ), output the maximum meteor danger level that is on some edge on the simple path from x_j to some open store, or -1 if there is no such edge. This is an illustration of the town given in the sample input. In the first query, there are no open stores, so obviously there are no edges on the simple path from 1 to any open store, so the answer is -1 . After the second and third queries, the set "... |
99276 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
143713910 | rainboy | E | Jan. 22, 2022, 7:20 p.m. | OK | GNU C11 | TESTS | 125 | 982 | 37888000 | ||
143683767 | feecIe6418 | E | Jan. 22, 2022, 3:58 p.m. | OK | GNU C++14 | TESTS | 125 | 795 | 96563200 | ||
143718168 | meyi | E | Jan. 22, 2022, 8:42 p.m. | OK | GNU C++14 | TESTS | 125 | 951 | 198451200 | ||
143726859 | _zzw4257 | E | Jan. 23, 2022, 2:02 a.m. | OK | GNU C++14 | TESTS | 125 | 1044 | 108544000 | ||
143698932 | _zzw4257 | E | Jan. 22, 2022, 4:33 p.m. | OK | GNU C++14 | TESTS | 125 | 1075 | 127795200 | ||
143724669 | Werner_Yin | E | Jan. 23, 2022, 12:42 a.m. | OK | GNU C++14 | TESTS | 125 | 1107 | 179404800 | ||
143706428 | MoRanSky | E | Jan. 22, 2022, 5:50 p.m. | OK | GNU C++14 | TESTS | 125 | 1122 | 95744000 | ||
143736225 | Alex_Wei | E | Jan. 23, 2022, 5:13 a.m. | OK | GNU C++14 | TESTS | 125 | 1466 | 112640000 | ||
143684851 | slime | E | Jan. 22, 2022, 4 p.m. | OK | GNU C++14 | TESTS | 125 | 1496 | 101273600 | ||
143706670 | MoRanSky | E | Jan. 22, 2022, 5:52 p.m. | OK | GNU C++14 | TESTS | 125 | 1574 | 89702400 | ||
143706492 | MoRanSky | E | Jan. 22, 2022, 5:50 p.m. | OK | GNU C++14 | TESTS | 125 | 1887 | 53657600 | ||
143660564 | izone | E | Jan. 22, 2022, 3:12 p.m. | OK | GNU C++17 | TESTS | 125 | 436 | 40857600 | ||
143733892 | fallleaves01 | E | Jan. 23, 2022, 4:39 a.m. | OK | GNU C++17 | TESTS | 125 | 655 | 159129600 | ||
143728670 | DerekFeng | E | Jan. 23, 2022, 2:54 a.m. | OK | GNU C++17 | TESTS | 125 | 702 | 98918400 | ||
143707752 | Alpha_Q | E | Jan. 22, 2022, 6:02 p.m. | OK | GNU C++17 | TESTS | 125 | 779 | 52940800 | ||
143720799 | Allvik06 | E | Jan. 22, 2022, 9:56 p.m. | OK | GNU C++17 | TESTS | 125 | 888 | 77721600 | ||
143699686 | A.K.E.E. | E | Jan. 22, 2022, 4:34 p.m. | OK | GNU C++17 | TESTS | 125 | 966 | 118476800 | ||
143735095 | Timsei | E | Jan. 23, 2022, 4:57 a.m. | OK | GNU C++17 | TESTS | 125 | 967 | 254668800 | ||
143692304 | Nachia | E | Jan. 22, 2022, 4:18 p.m. | OK | GNU C++17 | TESTS | 125 | 982 | 49356800 | ||
143734623 | OMG_link | E | Jan. 23, 2022, 4:50 a.m. | OK | GNU C++17 | TESTS | 125 | 1013 | 92364800 | ||
143728517 | A-Dance-Of-Fire-And-Ice | E | Jan. 23, 2022, 2:50 a.m. | OK | GNU C++17 | TESTS | 125 | 1029 | 75673600 | ||
143713934 | rainboy | E | Jan. 22, 2022, 7:21 p.m. | OK | GNU C++17 (64) | TESTS | 125 | 561 | 39116800 | ||
143703137 | Alan233 | E | Jan. 22, 2022, 5:28 p.m. | OK | GNU C++17 (64) | TESTS | 125 | 655 | 77209600 | ||
143684754 | ecnerwala | E | Jan. 22, 2022, 4 p.m. | OK | GNU C++17 (64) | TESTS | 125 | 733 | 60416000 | ||
143684297 | maroonrk | E | Jan. 22, 2022, 3:59 p.m. | OK | GNU C++17 (64) | TESTS | 125 | 811 | 74547200 | ||
143702755 | neal | E | Jan. 22, 2022, 5:26 p.m. | OK | GNU C++17 (64) | TESTS | 125 | 841 | 52428800 | ||
143695817 | ideology | E | Jan. 22, 2022, 4:26 p.m. | OK | GNU C++17 (64) | TESTS | 125 | 857 | 121446400 | ||
143704648 | SSRS_ | E | Jan. 22, 2022, 5:36 p.m. | OK | GNU C++17 (64) | TESTS | 125 | 888 | 68812800 | ||
143695968 | Froggay | E | Jan. 22, 2022, 4:26 p.m. | OK | GNU C++17 (64) | TESTS | 125 | 888 | 76492800 | ||
143678064 | Benq | E | Jan. 22, 2022, 3:45 p.m. | OK | GNU C++17 (64) | TESTS | 125 | 904 | 63078400 | ||
143697756 | QAQAutoMaton | E | Jan. 22, 2022, 4:30 p.m. | OK | GNU C++17 (64) | TESTS | 125 | 904 | 89600000 | ||
143715118 | BalintR | E | Jan. 22, 2022, 7:40 p.m. | OK | GNU C++20 (64) | TESTS | 125 | 529 | 55910400 | ||
143686844 | mhq | E | Jan. 22, 2022, 4:05 p.m. | OK | GNU C++20 (64) | TESTS | 125 | 545 | 74854400 | ||
143723995 | maximumSHOT | E | Jan. 23, 2022, 12:11 a.m. | OK | GNU C++20 (64) | TESTS | 125 | 561 | 92160000 | ||
143727446 | comld | E | Jan. 23, 2022, 2:21 a.m. | OK | GNU C++20 (64) | TESTS | 125 | 763 | 109465600 | ||
143711497 | ei133333 | E | Jan. 22, 2022, 6:44 p.m. | OK | GNU C++20 (64) | TESTS | 125 | 779 | 118784000 | ||
143720413 | Rubikun | E | Jan. 22, 2022, 9:44 p.m. | OK | GNU C++20 (64) | TESTS | 125 | 780 | 117862400 | ||
143732970 | pavement | E | Jan. 23, 2022, 4:22 a.m. | OK | GNU C++20 (64) | TESTS | 125 | 826 | 243814400 | ||
143720559 | Bugman | E | Jan. 22, 2022, 9:47 p.m. | OK | GNU C++20 (64) | TESTS | 125 | 842 | 84070400 | ||
143709857 | Nero | E | Jan. 22, 2022, 6:24 p.m. | OK | GNU C++20 (64) | TESTS | 125 | 873 | 70963200 | ||
143685498 | xtqqwq | E | Jan. 22, 2022, 4:02 p.m. | OK | GNU C++20 (64) | TESTS | 125 | 920 | 108646400 | ||
143697641 | sansen | E | Jan. 22, 2022, 4:30 p.m. | OK | Rust 2021 | TESTS | 125 | 826 | 62259200 |
Back to search problems