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 |
---|---|---|---|---|---|---|
1486 | Codeforces Round 703 (Div. 2) | FINISHED | False | 8100 | 123607463 | Feb. 18, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 696 ) | F | Pairs of Paths | PROGRAMMING | combinatorics data structures trees |
B"You are given a tree consisting of n vertices, and m simple vertex paths. Your task is to find how many pairs of those paths intersect at exactly one vertex. More formally you have to find the number of pairs (i, j) (1 <= q i < j <= q m) such that path_i and path_j have exactly one vertex in common. First line contains a single integer n (1 <= q n <= q 3 cdot 10^5) . Next n - 1 lines describe the tree. Each line contains two integers u and v (1 <= q u, v <= q n) describing an edge between vertices u and v . Next line contains a single integer m (1 <= q m <= q 3 cdot 10^5) . Next m lines describe paths. Each line describes a path by it's two endpoints u and v (1 <= q u, v <= q n) . The given path is all the vertices on the shortest path from u to v (including u and v ). Output a single integer -- the number of pairs of paths that intersect at exactly one vertex. The tree in the first example and paths look like this. Pairs (1,4) and (3,4) intersect at one vertex. In the second example all three paths contain the same single vertex, so all pairs (1, 2) , (1, 3) and (2, 3) intersect at one vertex. The third example is the same as the first example with two additional paths. Pairs (1,4) , (1,5) , (2,5) , (3,4) , (3,5) , (3,6) and (5,6) intersect at one vertex. "... |
Codeforces Round #703 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
107897568 | OMG_link | F | Feb. 19, 2021, 3:02 a.m. | OK | GNU C++11 | TESTS | 58 | 982 | 92979200 | ||
107891497 | Wall_breaker | F | Feb. 18, 2021, 11:58 p.m. | OK | GNU C++11 | TESTS | 58 | 1747 | 93491200 | ||
107891243 | lyfakioi | F | Feb. 18, 2021, 11:44 p.m. | OK | GNU C++11 | TESTS | 58 | 1981 | 191590400 | ||
107889727 | AQT | F | Feb. 18, 2021, 10:46 p.m. | OK | GNU C++11 | TESTS | 58 | 2214 | 71782400 | ||
107909239 | syksykCCC | F | Feb. 19, 2021, 5:51 a.m. | OK | GNU C++14 | TESTS | 58 | 919 | 64204800 | ||
107891401 | AgentMaster | F | Feb. 18, 2021, 11:53 p.m. | OK | GNU C++14 | TESTS | 58 | 2012 | 88985600 | ||
107886452 | marcOS | F | Feb. 18, 2021, 9:04 p.m. | OK | GNU C++14 | TESTS | 58 | 2964 | 162304000 | ||
107871162 | farmerboy | F | Feb. 18, 2021, 5:49 p.m. | OK | GNU C++14 | TESTS | 58 | 4024 | 130662400 | ||
107903402 | sh1194 | F | Feb. 19, 2021, 4:38 a.m. | OK | GNU C++17 | TESTS | 58 | 951 | 56217600 | ||
107903470 | sh1194 | F | Feb. 19, 2021, 4:39 a.m. | OK | GNU C++17 | TESTS | 58 | 1013 | 56217600 | ||
107886799 | Blondie | F | Feb. 18, 2021, 9:13 p.m. | OK | GNU C++17 | TESTS | 58 | 1060 | 58265600 | ||
107901930 | anodiebird | F | Feb. 19, 2021, 4:17 a.m. | OK | GNU C++17 | TESTS | 58 | 1075 | 56217600 | ||
107886213 | Bench0310 | F | Feb. 18, 2021, 8:58 p.m. | OK | GNU C++17 | TESTS | 58 | 1200 | 66355200 | ||
107879891 | ijxjdjd | F | Feb. 18, 2021, 7:11 p.m. | OK | GNU C++17 | TESTS | 58 | 1263 | 73523200 | ||
107887916 | WolfBlue | F | Feb. 18, 2021, 9:43 p.m. | OK | GNU C++17 | TESTS | 58 | 1263 | 87244800 | ||
107875842 | nigus | F | Feb. 18, 2021, 6:25 p.m. | OK | GNU C++17 | TESTS | 58 | 1482 | 91955200 | ||
107900550 | deafakioi | F | Feb. 19, 2021, 3:54 a.m. | OK | GNU C++17 | TESTS | 58 | 1497 | 92774400 | ||
107896788 | briansu | F | Feb. 19, 2021, 2:46 a.m. | OK | GNU C++17 | TESTS | 58 | 1575 | 91033600 | ||
107891369 | rainboy | F | Feb. 18, 2021, 11:51 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 499 | 60723200 | ||
107870132 | Geothermal | F | Feb. 18, 2021, 5:44 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 1154 | 111206400 | ||
107892190 | timmyfeng | F | Feb. 19, 2021, 12:30 a.m. | OK | GNU C++17 (64) | TESTS | 58 | 1372 | 83251200 | ||
107891287 | njwrz | F | Feb. 18, 2021, 11:47 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 1404 | 191283200 | ||
107908121 | playf | F | Feb. 19, 2021, 5:39 a.m. | OK | GNU C++17 (64) | TESTS | 58 | 1481 | 113664000 | ||
107876338 | Ormlis | F | Feb. 18, 2021, 6:30 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 1497 | 112332800 | ||
107904846 | kimoyami | F | Feb. 19, 2021, 4:58 a.m. | OK | GNU C++17 (64) | TESTS | 58 | 1512 | 147660800 | ||
107901563 | dmga44 | F | Feb. 19, 2021, 4:12 a.m. | OK | GNU C++17 (64) | TESTS | 58 | 1653 | 164761600 | ||
107887124 | emorgan5289 | F | Feb. 18, 2021, 9:21 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 1809 | 135270400 | ||
107873948 | mh755628 | F | Feb. 18, 2021, 6:08 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 1872 | 110694400 |
Back to search problems