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 |
---|---|---|---|---|---|---|
1706 | Codeforces Round 809 (Div. 2) | FINISHED | False | 7200 | 79111463 | July 18, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2832 ) | E | Qpwoeirut and Vertices | PROGRAMMING | binary search data structures ds trees |
B'You are given a connected undirected graph with n vertices and m edges. Vertices of the graph are numbered by integers from 1 to n and edges of the graph are numbered by integers from 1 to m . Your task is to answer q queries, each consisting of two integers l and r . The answer to each query is the smallest non-negative integer k such that the following condition holds: The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains three integers n , m , and q ( 2 <= n <= 10^5 , 1 <= m, q <= 2 cdot 10^5 ) -- the number of vertices, edges, and queries respectively. Each of the next m lines contains two integers u_i and v_i ( 1 <= u_i, v_i <= n ) -- ends of the i -th edge. It is guaranteed that the graph is connected and there are no multiple edges or self-loops. Each of the next q lines contains two integers l and r ( 1 <= l <= r <= n ) -- descriptions of the queries. It is guaranteed that that the sum of n over all test cases does not exceed 10^5 , the sum of m over all test cases does not exceed 2 cdot 10^5 , and the sum of q over all test cases does not exceed 2 cdot 10^5 . For each test case, print q integers -- the answers to the queries. In the first test case, the graph contains 2 vertices and a single edge connecting vertices 1 and 2 . In the first query, l=1 and r=1 . It is possible to reach any vertex from itself, so the answer to this query is 0 . In the second query, l=1 and r=2 . Vertices 1 and 2 are reachable from one another using only the first edge, through the path 1 longleftrightarrow 2 . It is impossible to reach vertex 2 from vertex 1 using only the first 0 edges. So, the answer to this query is 1'... |
Codeforces Round #809 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
164838496 | wind_cross | E | July 19, 2022, 2:57 a.m. | OK | GNU C++14 | TESTS | 55 | 171 | 68403200 | ||
164835204 | win10 | E | July 19, 2022, 2:16 a.m. | OK | GNU C++14 | TESTS | 55 | 218 | 28774400 | ||
164835937 | HoangPhuong3183 | E | July 19, 2022, 2:25 a.m. | OK | GNU C++14 | TESTS | 55 | 233 | 2457600 | ||
164805200 | MASTER_MOUF | E | July 18, 2022, 6:21 p.m. | OK | GNU C++14 | TESTS | 55 | 265 | 94720000 | ||
164842563 | hgzxwzf | E | July 19, 2022, 3:51 a.m. | OK | GNU C++14 | TESTS | 55 | 295 | 21606400 | ||
164846246 | Kzos_017 | E | July 19, 2022, 4:48 a.m. | OK | GNU C++14 | TESTS | 55 | 311 | 66355200 | ||
164831156 | xiao_lang | E | July 19, 2022, 1:21 a.m. | OK | GNU C++14 | TESTS | 55 | 312 | 134656000 | ||
164840957 | Recalling_Clouds | E | July 19, 2022, 3:29 a.m. | OK | GNU C++14 | TESTS | 55 | 327 | 10035200 | ||
164825480 | zzlzzlzzl | E | July 18, 2022, 11:16 p.m. | OK | GNU C++14 | TESTS | 55 | 342 | 162816000 | ||
164850195 | nanmenyangde | E | July 19, 2022, 5:43 a.m. | OK | GNU C++14 | TESTS | 55 | 358 | 28467200 | ||
164848990 | Bobocan | E | July 19, 2022, 5:27 a.m. | OK | GNU C++17 | TESTS | 55 | 62 | 9318400 | ||
164799400 | Bobocan | E | July 18, 2022, 5:34 p.m. | OK | GNU C++17 | TESTS | 55 | 171 | 28262400 | ||
164800896 | willy108 | E | July 18, 2022, 5:44 p.m. | OK | GNU C++17 | TESTS | 55 | 202 | 74035200 | ||
164799146 | Bobocan | E | July 18, 2022, 5:32 p.m. | OK | GNU C++17 | TESTS | 55 | 218 | 22118400 | ||
164808955 | islingr | E | July 18, 2022, 7 p.m. | OK | GNU C++17 | TESTS | 55 | 233 | 5120000 | ||
164808759 | islingr | E | July 18, 2022, 6:58 p.m. | OK | GNU C++17 | TESTS | 55 | 249 | 5120000 | ||
164805716 | forgothandle | E | July 18, 2022, 6:26 p.m. | OK | GNU C++17 | TESTS | 55 | 249 | 70553600 | ||
164820585 | Perry_Prasad_Platypus | E | July 18, 2022, 9:30 p.m. | OK | GNU C++17 | TESTS | 55 | 264 | 2457600 | ||
164798181 | lunchbox | E | July 18, 2022, 5:27 p.m. | OK | GNU C++17 | TESTS | 55 | 264 | 2457600 | ||
164837600 | BigFaceDog | E | July 19, 2022, 2:46 a.m. | OK | GNU C++17 | TESTS | 55 | 280 | 24371200 | ||
164807419 | beza | E | July 18, 2022, 6:43 p.m. | OK | GNU C++17 (64) | TESTS | 55 | 186 | 4198400 | ||
164801236 | vipjml | E | July 18, 2022, 5:47 p.m. | OK | GNU C++17 (64) | TESTS | 55 | 202 | 3072000 | ||
164806560 | vipjml | E | July 18, 2022, 6:34 p.m. | OK | GNU C++17 (64) | TESTS | 55 | 202 | 8192000 | ||
164839142 | Kenshin2438 | E | July 19, 2022, 3:06 a.m. | OK | GNU C++17 (64) | TESTS | 55 | 202 | 24985600 | ||
164802442 | wyyxhjth | E | July 18, 2022, 5:57 p.m. | OK | GNU C++17 (64) | TESTS | 55 | 218 | 16281600 | ||
164830386 | Cherumi | E | July 19, 2022, 1:10 a.m. | OK | GNU C++17 (64) | TESTS | 55 | 218 | 22630400 | ||
164830339 | Cherumi | E | July 19, 2022, 1:09 a.m. | OK | GNU C++17 (64) | TESTS | 55 | 218 | 22630400 | ||
164831541 | Vectors_Master | E | July 19, 2022, 1:27 a.m. | OK | GNU C++17 (64) | TESTS | 55 | 233 | 31027200 | ||
164799534 | Beevo | E | July 18, 2022, 5:35 p.m. | OK | GNU C++17 (64) | TESTS | 55 | 249 | 24576000 | ||
164819598 | Valera_Grinenko | E | July 18, 2022, 9:12 p.m. | OK | GNU C++17 (64) | TESTS | 55 | 265 | 43827200 | ||
164837805 | ftiasch | E | July 19, 2022, 2:48 a.m. | OK | GNU C++20 (64) | TESTS | 55 | 171 | 24985600 | ||
164808930 | islingr | E | July 18, 2022, 7 p.m. | OK | GNU C++20 (64) | TESTS | 55 | 187 | 7065600 | ||
164836835 | ftiasch | E | July 19, 2022, 2:36 a.m. | OK | GNU C++20 (64) | TESTS | 55 | 187 | 24985600 | ||
164811557 | Byakko | E | July 18, 2022, 7:29 p.m. | OK | GNU C++20 (64) | TESTS | 55 | 187 | 26112000 | ||
164801084 | willy108 | E | July 18, 2022, 5:46 p.m. | OK | GNU C++20 (64) | TESTS | 55 | 187 | 93491200 | ||
164833371 | menborong | E | July 19, 2022, 1:52 a.m. | OK | GNU C++20 (64) | TESTS | 55 | 202 | 4300800 | ||
164850225 | Sylv | E | July 19, 2022, 5:44 a.m. | OK | GNU C++20 (64) | TESTS | 55 | 202 | 13824000 | ||
164809181 | WAtoAC2001 | E | July 18, 2022, 7:03 p.m. | OK | GNU C++20 (64) | TESTS | 55 | 202 | 36659200 | ||
164823253 | eyangch | E | July 18, 2022, 10:22 p.m. | OK | GNU C++20 (64) | TESTS | 55 | 202 | 37376000 | ||
164800714 | willy108 | E | July 18, 2022, 5:43 p.m. | OK | GNU C++20 (64) | TESTS | 55 | 202 | 79769600 | ||
164798865 | merlin_ | E | July 18, 2022, 5:31 p.m. | OK | Java 17 | TESTS | 55 | 1965 | 142336000 | ||
164827460 | Abdallah_Ragab00 | E | July 19, 2022, 12:10 a.m. | OK | Java 8 | TESTS | 55 | 950 | 76185600 | ||
164806031 | DylanSmith | E | July 18, 2022, 6:29 p.m. | OK | Java 8 | TESTS | 55 | 1029 | 74649600 | ||
164834349 | mkawa2 | E | July 19, 2022, 2:05 a.m. | OK | PyPy 3-64 | TESTS | 55 | 1201 | 57651200 | ||
164826952 | magnus.hegdahl | E | July 18, 2022, 11:56 p.m. | OK | Rust 2021 | TESTS | 55 | 77 | 23552000 | ||
164809058 | sansen | E | July 18, 2022, 7:01 p.m. | OK | Rust 2021 | TESTS | 55 | 78 | 17510400 | ||
164827087 | magnus.hegdahl | E | July 19, 2022, midnight | OK | Rust 2021 | TESTS | 55 | 78 | 23552000 | ||
164826739 | magnus.hegdahl | E | July 18, 2022, 11:50 p.m. | OK | Rust 2021 | TESTS | 55 | 78 | 23552000 | ||
164807554 | magnus.hegdahl | E | July 18, 2022, 6:45 p.m. | OK | Rust 2021 | TESTS | 55 | 109 | 27238400 | ||
164826628 | magnus.hegdahl | E | July 18, 2022, 11:47 p.m. | OK | Rust 2021 | TESTS | 55 | 124 | 25088000 | ||
164808263 | magnus.hegdahl | E | July 18, 2022, 6:52 p.m. | OK | Rust 2021 | TESTS | 55 | 124 | 27238400 | ||
164826064 | magnus.hegdahl | E | July 18, 2022, 11:31 p.m. | OK | Rust 2021 | TESTS | 55 | 124 | 50688000 | ||
164848776 | bjin | E | July 19, 2022, 5:25 a.m. | OK | Rust 2021 | TESTS | 55 | 218 | 16896000 | ||
164847593 | bjin | E | July 19, 2022, 5:09 a.m. | OK | Rust 2021 | TESTS | 55 | 218 | 16896000 |
Back to search problems