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 |
---|---|---|---|---|---|---|
1142 | Codeforces Round 549 (Div. 1) | FINISHED | False | 7200 | 183473387 | March 30, 2019, 5:10 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 525 ) | E | Pink Floyd | PROGRAMMING | graphs interactive | 3100 |
B'This is an interactive task. Scientists are about to invent a new optimization for the Floyd-Warshall algorithm, which will allow it to work in linear time. There is only one part of the optimization still unfinished. It is well known that the Floyd-Warshall algorithm takes a graph with n nodes and exactly one edge between each pair of nodes. The scientists have this graph, what is more, they have directed each edge in one of the two possible directions. To optimize the algorithm, exactly m edges are colored in pink color and all the rest are colored in green. You know the direction of all m pink edges, but the direction of green edges is unknown to you. In one query you can ask the scientists about the direction of exactly one green edge, however, you can perform at most 2 cdot n such queries. Your task is to find the node from which every other node can be reached by a path consisting of edges of same color. Be aware that the scientists may have lied that they had fixed the direction of all edges beforehand, so their answers may depend on your queries. The first line contains two integers n and m ( 1 <= n <= 100 ,000 , 0 <= m <= 100 ,000 ) -- the number of nodes and the number of pink edges. The next m lines describe the pink edges, the i -th of these lines contains two integers u_i , v_i ( 1 <= u_i, v_i <= n , u_i ne v_i ) -- the start and the end of the i -th pink edge. It is guaranteed, that all unordered pairs (u_i, v_i) are distinct. When you found the answer, print "!" and the number of the node from which every other node can be reached by a single-colored path. To ask the direction of the green edge between nodes a and b , print "?", a and b in single line, separated by the space characters. In answer to this read a single integer, which will be 1 if the edge is directed from a to b and 0 if the edge i'... |
Codeforces Round #549 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
52512530 | hos.lyric | E | April 9, 2019, 1:14 a.m. | OK | D | TESTS | 93 | 1496 | 36966400 | 3100 | |
55986257 | vjudge5 | E | June 24, 2019, 3:55 a.m. | OK | GNU C++11 | TESTS | 93 | 639 | 8192000 | 3100 | |
55610411 | ReaLNero1 | E | June 16, 2019, 5:18 a.m. | OK | GNU C++11 | TESTS | 93 | 654 | 9318400 | 3100 | |
52225749 | Minamoto | E | April 2, 2019, 9:21 a.m. | OK | GNU C++11 | TESTS | 93 | 670 | 9318400 | 3100 | |
65615897 | spacevortex | E | Nov. 24, 2019, 3:35 a.m. | OK | GNU C++11 | TESTS | 93 | 670 | 15667200 | 3100 | |
66815550 | Zory | E | Dec. 14, 2019, 5:31 a.m. | OK | GNU C++11 | TESTS | 93 | 670 | 19660800 | 3100 | |
52225881 | Minamoto | E | April 2, 2019, 9:25 a.m. | OK | GNU C++11 | TESTS | 93 | 685 | 9318400 | 3100 | |
52372513 | panole | E | April 6, 2019, 6:51 a.m. | OK | GNU C++11 | TESTS | 93 | 685 | 11059200 | 3100 | |
56001955 | vjudge5 | E | June 24, 2019, 1:27 p.m. | OK | GNU C++11 | TESTS | 93 | 685 | 18636800 | 3100 | |
52372688 | panole | E | April 6, 2019, 6:55 a.m. | OK | GNU C++11 | TESTS | 93 | 686 | 11059200 | 3100 | |
57866620 | lopare | E | July 27, 2019, 9:30 p.m. | OK | GNU C++11 | TESTS | 93 | 686 | 11264000 | 3100 | |
52074328 | zsyzsy | E | March 31, 2019, 9:16 a.m. | OK | GNU C++14 | TESTS | 93 | 920 | 12492800 | 3100 | |
56006277 | wnmMrrd | E | June 24, 2019, 3:42 p.m. | OK | GNU C++14 | TESTS | 93 | 951 | 12288000 | 3100 | |
55954460 | vjudge1 | E | June 23, 2019, 6:01 a.m. | OK | GNU C++14 | TESTS | 93 | 982 | 17100800 | 3100 | |
68434982 | CYJian | E | Jan. 9, 2020, 8:36 a.m. | OK | GNU C++14 | TESTS | 93 | 998 | 9011200 | 3100 | |
52225571 | newbiegcz | E | April 2, 2019, 9:15 a.m. | OK | GNU C++14 | TESTS | 93 | 998 | 15155200 | 3100 | |
52138903 | yasugongshang | E | April 1, 2019, 5:29 a.m. | OK | GNU C++14 | TESTS | 93 | 1013 | 14745600 | 3100 | |
52595597 | alan_cty | E | April 11, 2019, 8:48 a.m. | OK | GNU C++14 | TESTS | 93 | 1014 | 12288000 | 3100 | |
58319336 | ataekOnOrigin | E | Aug. 5, 2019, 4:54 a.m. | OK | GNU C++14 | TESTS | 93 | 1029 | 11980800 | 3100 | |
56627103 | luogu_bot3 | E | July 6, 2019, 2:29 p.m. | OK | GNU C++14 | TESTS | 93 | 1029 | 12492800 | 3100 | |
55954342 | Aqua_blue | E | June 23, 2019, 5:55 a.m. | OK | GNU C++14 | TESTS | 93 | 1029 | 17100800 | 3100 | |
52892487 | Destiny025 | E | April 17, 2019, 8:32 a.m. | OK | GNU C++17 | TESTS | 93 | 982 | 12492800 | 3100 | |
52222923 | jinjonik | E | April 2, 2019, 7:39 a.m. | OK | GNU C++17 | TESTS | 93 | 982 | 12492800 | 3100 | |
59520373 | HyscereXD | E | Aug. 26, 2019, 11:39 a.m. | OK | GNU C++17 | TESTS | 93 | 998 | 48947200 | 3100 | |
52443556 | sheaf | E | April 7, 2019, 7:12 a.m. | OK | GNU C++17 | TESTS | 93 | 1013 | 15052800 | 3100 | |
52083382 | teapotd | E | March 31, 2019, 1:13 p.m. | OK | GNU C++17 | TESTS | 93 | 1029 | 9932800 | 3100 | |
52883642 | zhouyuheng | E | April 17, 2019, 3:07 a.m. | OK | GNU C++17 | TESTS | 93 | 1029 | 11264000 | 3100 | |
52143400 | 131131yhx | E | April 1, 2019, 8:02 a.m. | OK | GNU C++17 | TESTS | 93 | 1029 | 12288000 | 3100 | |
56874613 | Nakagawa.Kanon | E | July 12, 2019, 7:49 a.m. | OK | GNU C++17 | TESTS | 93 | 1044 | 15360000 | 3100 | |
52767507 | Shayan.P | E | April 15, 2019, 5:35 a.m. | OK | GNU C++17 | TESTS | 93 | 1045 | 16179200 | 3100 | |
55482316 | Siberian | E | June 12, 2019, 5:59 a.m. | OK | GNU C++17 | TESTS | 93 | 1060 | 16179200 | 3100 | |
53111251 | vjudge3 | E | April 22, 2019, 3:11 a.m. | OK | Java 8 | TESTS | 93 | 3899 | 33996800 | 3100 | |
55747479 | siddhantray | E | June 19, 2019, 10:51 a.m. | OK | Java 8 | TESTS | 93 | 3915 | 45158400 | 3100 | |
53110754 | just_soso | E | April 22, 2019, 2:24 a.m. | OK | Java 8 | TESTS | 93 | 3915 | 47001600 | 3100 | |
53111230 | just_soso | E | April 22, 2019, 3:10 a.m. | OK | Java 8 | TESTS | 93 | 3946 | 33996800 | 3100 | |
53110851 | vjudge4 | E | April 22, 2019, 2:35 a.m. | OK | Java 8 | TESTS | 93 | 3977 | 45465600 | 3100 | |
53110769 | vjudge3 | E | April 22, 2019, 2:26 a.m. | OK | Java 8 | TESTS | 93 | 3978 | 47308800 | 3100 |
Back to search problems