Codeforces Round 866 (Div. 1)

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
1819 Codeforces Round 866 (Div. 1) FINISHED False 7200 55630463 April 15, 2023, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 321 ) E Roads in E City PROGRAMMING interactive math probabilities trees

B'This is an interactive problem. As is well known, the city "E" has never had its roads repaired in its a thousand and a half years old history. And only recently the city administration repaired some of them. It is known that in total in the city "E" there are n intersections and m roads, which can be used in both directions, numbered with integers from 1 to m . The i -th road connects intersections with numbers a_i and b_i . Among all m roads, some subset of the roads has been repaired, but you do not know which one. The only information you could get from the city 's road services is that you can get from any intersection to any other intersection by driving only on the roads that have been repaired. You are a young entrepreneur, and decided to organize a delivery service of fresh raw meat in the city "E" (in this city such meat is called "steaks", it is very popular among the locals). You have already recruited a staff of couriers, but the couriers are willing to travel only on repaired roads. Now you have to find out which roads have already been repaired. The city administration has given you the city for a period of time, so you can make different queries of one of three types: Unfortunately, the city is placed at your complete disposal for a short period of time, so you can make no more than 100 cdot m requests. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 1 ,000 ) -- the number of test cases. The description of test cases follows. The first line contains two integers n and m ( 2 <= n <= 2 ,000 , n - 1 <= m <= 2 ,000 ) --the number of intersections and roads in the city "E". Each of the following m lines describes one road. The i -th of these lines contains two integers a_i and b_i ( 1 <= a_i, b_i <= n ) -- the ends of the i -th road. It is guaranteed that no road connects'...

Tutorials

Codeforces Round #866 (Div.1, Div.2, based on Lipetsk Team Olympiad) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
202316340 use_fft E April 16, 2023, 2:31 a.m. OK GNU C++14 TESTS 44 1185 56934400
202240557 JohnVictor E April 15, 2023, 12:37 p.m. OK GNU C++14 TESTS 44 1387 16486400
202223532 Radewoosh E April 15, 2023, 10:49 a.m. OK GNU C++17 TESTS 44 1013 614400
202238575 stevenkplus E April 15, 2023, 12:21 p.m. OK GNU C++17 (64) TESTS 44 685 307200
202308964 orzdevinwang E April 15, 2023, 11:50 p.m. OK GNU C++17 (64) TESTS 44 904 45465600
202324016 Kubic E April 16, 2023, 4:49 a.m. OK GNU C++17 (64) TESTS 44 1013 307200
202225560 yzc2005 E April 15, 2023, 10:55 a.m. OK GNU C++17 (64) TESTS 44 1013 307200
202224265 orzdevinwang E April 15, 2023, 10:51 a.m. OK GNU C++17 (64) TESTS 44 1045 45465600
202302642 maxplus E April 15, 2023, 9:53 p.m. OK GNU C++20 (64) TESTS 44 607 307200
202237435 Rebelz E April 15, 2023, 12:11 p.m. OK GNU C++20 (64) TESTS 44 826 204800
202223484 turmax E April 15, 2023, 10:49 a.m. OK GNU C++20 (64) TESTS 44 857 307200
202289818 A_G E April 15, 2023, 7:18 p.m. OK GNU C++20 (64) TESTS 44 873 307200
202326520 njwrz E April 16, 2023, 5:27 a.m. OK GNU C++20 (64) TESTS 44 919 307200
202253482 hos.lyric E April 15, 2023, 2:16 p.m. OK GNU C++20 (64) TESTS 44 935 102400
202247496 jeroenodb E April 15, 2023, 1:30 p.m. OK GNU C++20 (64) TESTS 44 950 204800
202271512 cabbit E April 15, 2023, 5:13 p.m. OK GNU C++20 (64) TESTS 44 951 307200
202235283 Golovanov399 E April 15, 2023, 11:58 a.m. OK GNU C++20 (64) TESTS 44 1028 102400
202319255 watashikininarimasu E April 16, 2023, 3:24 a.m. OK GNU C++20 (64) TESTS 44 1060 307200

remove filters

Back to search problems