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 |
---|---|---|---|---|---|---|
1787 | TypeDB Forces 2023 (Div. 1 + Div. 2, Rated, Prizes!) | FINISHED | False | 10800 | 62263463 | Jan. 29, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 458 ) | G | Colorful Tree Again | PROGRAMMING | data structures |
B'An edge-weighted tree of n nodes is given with each edge colored in some color. Each node of this tree can be blocked or unblocked, all nodes are unblocked initially. A simple path is a path in a graph that does not have repeating nodes. The length of a path is defined as the sum of weights of all edges on the path. A path is good when it is a simple path consisting of edges of the same color c , all edges of color c are on this path, and every node on the path is unblocked. You need to operate 2 kinds of queries: After each query, print the maximum length among all good paths. If there are no good paths, print 0 . The first line contains two integers n , q ( 1 <= q n,q <= q 2 cdot 10^5 ) -- the number of nodes and the number of queries. Then n-1 lines follow, each containing four integers u , v , w and c ( 1 <= q u,v,w,c <= q n ; u not = v ), denoting a weighted edge connecting node u and node v with weight w and color c . It is guaranteed that these edges form a tree. Then q lines follow, each containing two integers p and x ( p = 0 or p = 1 , 1 <= q x <= q n ), denoting a query: For each query, print the maximum length of a good path. If there are no good paths, print 0 . '... |
TypeDB Forces 2023 (Div. 1 + Div. 2, Rated, Prizes!) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
191182756 | rainboy | G | Jan. 29, 2023, 9:10 p.m. | OK | GNU C11 | TESTS | 35 | 1170 | 23244800 | ||
191162279 | NoPotato | G | Jan. 29, 2023, 5:30 p.m. | OK | GNU C++14 | TESTS | 35 | 452 | 65126400 | ||
191198054 | yyyyxh329 | G | Jan. 30, 2023, 2:55 a.m. | OK | GNU C++14 | TESTS | 36 | 499 | 35328000 | ||
191199584 | bkifhr10 | G | Jan. 30, 2023, 3:20 a.m. | OK | GNU C++14 | TESTS | 36 | 514 | 35328000 | ||
191205380 | cyh_toby | G | Jan. 30, 2023, 4:59 a.m. | OK | GNU C++14 | TESTS | 37 | 560 | 34611200 | ||
191201498 | Big_gold_date | G | Jan. 30, 2023, 3:51 a.m. | OK | GNU C++14 | TESTS | 37 | 577 | 65638400 | ||
191196156 | bkifhr6 | G | Jan. 30, 2023, 2:19 a.m. | OK | GNU C++14 | TESTS | 36 | 607 | 55603200 | ||
191153301 | hank55663 | G | Jan. 29, 2023, 4:47 p.m. | OK | GNU C++14 | TESTS | 35 | 1996 | 18329600 | ||
191176650 | hos.lyric | G | Jan. 29, 2023, 7:50 p.m. | OK | GNU C++17 | TESTS | 35 | 607 | 68608000 | ||
191163069 | Merkurev | G | Jan. 29, 2023, 5:33 p.m. | OK | GNU C++17 | TESTS | 35 | 608 | 28979200 | ||
191202930 | chen_zexing | G | Jan. 30, 2023, 4:16 a.m. | OK | GNU C++17 | TESTS | 37 | 623 | 35225600 | ||
191172552 | yuto1115 | G | Jan. 29, 2023, 7:07 p.m. | OK | GNU C++17 | TESTS | 35 | 624 | 37376000 | ||
191161603 | mango_lassi | G | Jan. 29, 2023, 5:27 p.m. | OK | GNU C++17 | TESTS | 35 | 655 | 27852800 | ||
191147352 | Um_nik | G | Jan. 29, 2023, 4:20 p.m. | OK | GNU C++17 | TESTS | 35 | 701 | 40550400 | ||
191198824 | lxyzlz1 | G | Jan. 30, 2023, 3:08 a.m. | OK | GNU C++17 | TESTS | 36 | 701 | 41779200 | ||
191158266 | coriander | G | Jan. 29, 2023, 5:11 p.m. | OK | GNU C++17 | TESTS | 35 | 826 | 80691200 | ||
191155040 | IOMO | G | Jan. 29, 2023, 4:55 p.m. | OK | GNU C++17 | TESTS | 35 | 1591 | 41164800 | ||
191182838 | rainboy | G | Jan. 29, 2023, 9:12 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 311 | 23859200 | ||
191200440 | Tadapally | G | Jan. 30, 2023, 3:34 a.m. | OK | GNU C++17 (64) | TESTS | 37 | 312 | 23859200 | ||
191157519 | QAQAutoMaton | G | Jan. 29, 2023, 5:07 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 545 | 81100800 | ||
191158693 | blackbori | G | Jan. 29, 2023, 5:13 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 561 | 52838400 | ||
191201735 | CharlesWuQiushi | G | Jan. 30, 2023, 3:55 a.m. | OK | GNU C++17 (64) | TESTS | 37 | 608 | 43008000 | ||
191159150 | Xylenox | G | Jan. 29, 2023, 5:15 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 701 | 472780800 | ||
191152547 | SSRS_ | G | Jan. 29, 2023, 4:43 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 764 | 64921600 | ||
191170114 | SSRS_ | G | Jan. 29, 2023, 6:46 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 764 | 82124800 | ||
191158898 | orzdevinwang | G | Jan. 29, 2023, 5:14 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 810 | 229376000 | ||
191157079 | Xellos | G | Jan. 29, 2023, 5:05 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 811 | 74547200 | ||
191202209 | fengzhengwei | G | Jan. 30, 2023, 4:02 a.m. | OK | GNU C++20 (64) | TESTS | 37 | 295 | 59084800 | ||
191202923 | edsa | G | Jan. 30, 2023, 4:15 a.m. | OK | GNU C++20 (64) | TESTS | 37 | 405 | 62156800 | ||
191152586 | tourist | G | Jan. 29, 2023, 4:43 p.m. | OK | GNU C++20 (64) | TESTS | 35 | 452 | 66355200 | ||
191152821 | dl720125 | G | Jan. 29, 2023, 4:45 p.m. | OK | GNU C++20 (64) | TESTS | 35 | 467 | 73625600 | ||
191163155 | tatyam | G | Jan. 29, 2023, 5:33 p.m. | OK | GNU C++20 (64) | TESTS | 35 | 482 | 66150400 | ||
191190812 | saketh | G | Jan. 30, 2023, 12:09 a.m. | OK | GNU C++20 (64) | TESTS | 35 | 482 | 83456000 | ||
191191615 | I_LOVE_DASHA_KARPENKO | G | Jan. 30, 2023, 12:35 a.m. | OK | GNU C++20 (64) | TESTS | 35 | 499 | 50688000 | ||
191184658 | rgnerdplayer | G | Jan. 29, 2023, 9:42 p.m. | OK | GNU C++20 (64) | TESTS | 35 | 499 | 76390400 | ||
191159900 | Tlatoani | G | Jan. 29, 2023, 5:18 p.m. | OK | GNU C++20 (64) | TESTS | 35 | 514 | 39628800 | ||
191200221 | forever_lose | G | Jan. 30, 2023, 3:30 a.m. | OK | GNU C++20 (64) | TESTS | 37 | 529 | 43212800 |
Back to search problems