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 |
|---|---|---|---|---|---|---|
| 883 | 2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 267832523 | Oct. 21, 2017, 8:05 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 1514 ) | G | Orientation of Edges | PROGRAMMING | dfs and similar graphs | 2000 |
Vasya has a graph containing both directed (oriented) and undirected (non-oriented) edges. There can be multiple edges between a pair of vertices. Vasya has picked a vertex s from the graph. Now Vasya wants to create two separate plans: to orient each undirected edge in one of two possible directions to maximize number of vertices reachable from vertex s ; to orient each undirected edge in one of two possible directions to minimize number of vertices reachable from vertex s . In each of two plans each undirected edge must become directed. For an edge chosen directions can differ in two plans. Help Vasya find the plans. The first line contains three integers n , m and s ( 2 ≤ n ≤ 3·10 5 , 1 ≤ m ≤ 3·10 5 , 1 ≤ s ≤ n ) — number of vertices and edges in the graph, and the vertex Vasya has picked. The following m lines contain information about the graph edges. Each line contains three integers t i , u i and v i ( 1 ≤ t i ≤ 2 , 1 ≤ u i , v i ≤ n , u i ≠ v i ) — edge type and vertices connected by the edge. If t i = 1 then the edge is directed and goes from the vertex u i to the vertex v i . If t i = 2 then the edge is undirected and it connects the vertices u i and v i . It is guaranteed that there is at least one undirected edge in the graph. The first two lines should describe the plan which maximizes the number of reachable vertices. The lines three and four should describe the plan which minimizes the number of reachable vertices. A description of each plan should start with a line containing the number of reachable vertices. The second line of a plan should consist of f symbols ' + ' and ' - ', where f is the number of undirected edges in the initial graph. Print ' + ' as the j -th symbol of the string if the j -th undirected edge ( u , v ) from the input should be oriented from u to v . Print ' - ' to signify the opposite direction (from v to u ). Consider undirected edges to be numbered in the same order they are given in the input. If there are multiple |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 31667041 | zhhx | G | Oct. 24, 2017, 2:44 a.m. | OK | GNU C++ | TESTS | 141 | 109 | 22630400 | 2000 | |
| 31666342 | mengbierr | G | Oct. 24, 2017, 1:56 a.m. | OK | GNU C++ | TESTS | 141 | 109 | 29184000 | 2000 | |
| 31618623 | zcyhhh | G | Oct. 23, 2017, 3:26 a.m. | OK | GNU C++ | TESTS | 141 | 124 | 15872000 | 2000 | |
| 31590004 | shiyilang | G | Oct. 22, 2017, 2:18 a.m. | OK | GNU C++ | TESTS | 141 | 140 | 26112000 | 2000 | |
| 40105798 | Unlimited | G | July 9, 2018, 8:26 a.m. | OK | GNU C++ | TESTS | 141 | 155 | 24473600 | 2000 | |
| 35077291 | 251 | G | Feb. 9, 2018, 4:03 a.m. | OK | GNU C++ | TESTS | 141 | 171 | 12595200 | 2000 | |
| 31626689 | Panole233 | G | Oct. 23, 2017, 11:27 a.m. | OK | GNU C++ | TESTS | 141 | 171 | 39014400 | 2000 | |
| 37511027 | weng_233 | G | April 21, 2018, 10:27 a.m. | OK | GNU C++ | TESTS | 141 | 186 | 18124800 | 2000 | |
| 31937007 | vjudge5 | G | Nov. 1, 2017, 2:57 a.m. | OK | GNU C++ | TESTS | 141 | 186 | 22835200 | 2000 | |
| 32422011 | zhixingr | G | Nov. 18, 2017, 6:14 a.m. | OK | GNU C++ | TESTS | 141 | 187 | 16281600 | 2000 | |
| 44427013 | luogu_bot1 | G | Oct. 17, 2018, 5:13 a.m. | OK | GNU C++11 | TESTS | 141 | 78 | 18329600 | 2000 | |
| 45032295 | kkxhh | G | Oct. 29, 2018, 5:13 a.m. | OK | GNU C++11 | TESTS | 141 | 93 | 14643200 | 2000 | |
| 64623888 | Mr_Kevin | G | Nov. 10, 2019, 7:55 a.m. | OK | GNU C++11 | TESTS | 141 | 93 | 17100800 | 2000 | |
| 69086106 | zombie462 | G | Jan. 19, 2020, 8:21 a.m. | OK | GNU C++11 | TESTS | 141 | 93 | 20070400 | 2000 | |
| 69047098 | vjudge3 | G | Jan. 18, 2020, 11:23 a.m. | OK | GNU C++11 | TESTS | 141 | 93 | 20172800 | 2000 | |
| 69047003 | Wangxuye | G | Jan. 18, 2020, 11:22 a.m. | OK | GNU C++11 | TESTS | 141 | 93 | 20172800 | 2000 | |
| 31589437 | Jori | G | Oct. 22, 2017, 1:27 a.m. | OK | GNU C++11 | TESTS | 141 | 93 | 27443200 | 2000 | |
| 45173975 | yxl_gl | G | Nov. 1, 2018, 1:55 p.m. | OK | GNU C++11 | TESTS | 141 | 93 | 30310400 | 2000 | |
| 44699776 | vicor | G | Oct. 22, 2018, 2:21 p.m. | OK | GNU C++11 | TESTS | 141 | 108 | 14438400 | 2000 | |
| 69086499 | vjudge2 | G | Jan. 19, 2020, 8:30 a.m. | OK | GNU C++11 | TESTS | 141 | 108 | 20070400 | 2000 | |
| 32238024 | simulator | G | Nov. 12, 2017, 8:25 a.m. | OK | GNU C++14 | TESTS | 141 | 217 | 23244800 | 2000 | |
| 48553997 | vjudge2 | G | Jan. 19, 2019, 4:05 a.m. | OK | GNU C++14 | TESTS | 141 | 234 | 14848000 | 2000 | |
| 31627561 | Wuxing | G | Oct. 23, 2017, 11:59 a.m. | OK | GNU C++14 | TESTS | 141 | 249 | 25190400 | 2000 | |
| 32086755 | 3_14149 | G | Nov. 6, 2017, 3:19 a.m. | OK | GNU C++14 | TESTS | 141 | 249 | 25497600 | 2000 | |
| 31996391 | swust_20131737 | G | Nov. 3, 2017, 2:32 a.m. | OK | GNU C++14 | TESTS | 141 | 265 | 13107200 | 2000 | |
| 32356713 | vjudge5 | G | Nov. 16, 2017, 1:45 p.m. | OK | GNU C++14 | TESTS | 141 | 265 | 16384000 | 2000 | |
| 31738282 | LeSoleil BanFcc 201530800126 | G | Oct. 26, 2017, 12:40 p.m. | OK | GNU C++14 | TESTS | 141 | 265 | 17203200 | 2000 | |
| 31591458 | HandsomeHow zhengsai VegaLearning | G | Oct. 22, 2017, 4:27 a.m. | OK | GNU C++14 | TESTS | 141 | 265 | 17408000 | 2000 | |
| 65687576 | ChrisT | G | Nov. 25, 2019, 1:43 a.m. | OK | GNU C++14 | TESTS | 141 | 265 | 23552000 | 2000 | |
| 46099447 | vjudge4 | G | Nov. 23, 2018, 4:23 a.m. | OK | GNU C++14 | TESTS | 141 | 280 | 13312000 | 2000 | |
| 53651310 | vjudge1 | G | May 2, 2019, 1:23 a.m. | OK | GNU C++17 | TESTS | 141 | 217 | 38195200 | 2000 | |
| 48589874 | vjudge2 | G | Jan. 20, 2019, 12:35 a.m. | OK | GNU C++17 | TESTS | 141 | 218 | 15155200 | 2000 | |
| 48597215 | vjudge3 | G | Jan. 20, 2019, 6:46 a.m. | OK | GNU C++17 | TESTS | 141 | 234 | 28364800 | 2000 | |
| 52523176 | ThroughTheNight | G | April 9, 2019, 10:02 a.m. | OK | GNU C++17 | TESTS | 141 | 265 | 32051200 | 2000 | |
| 48526497 | vjudge2 | G | Jan. 18, 2019, 9:16 a.m. | OK | GNU C++17 | TESTS | 141 | 265 | 36659200 | 2000 | |
| 44524084 | fcwww | G | Oct. 18, 2018, 11:52 p.m. | OK | GNU C++17 | TESTS | 141 | 280 | 16793600 | 2000 | |
| 48550245 | vjudge5 | G | Jan. 19, 2019, 1:08 a.m. | OK | GNU C++17 | TESTS | 141 | 296 | 27545600 | 2000 | |
| 58196171 | hbi1998 | G | Aug. 3, 2019, 12:31 a.m. | OK | GNU C++17 | TESTS | 141 | 311 | 20787200 | 2000 | |
| 64316987 | makiseEL | G | Nov. 5, 2019, 2:24 p.m. | OK | GNU C++17 | TESTS | 141 | 327 | 17817600 | 2000 | |
| 56190677 | hjk1030 | G | June 28, 2019, 7:23 a.m. | OK | GNU C++17 | TESTS | 141 | 327 | 39219200 | 2000 | |
| 32914559 | Tan1 | G | Dec. 4, 2017, 7:15 a.m. | OK | Java 8 | TESTS | 141 | 748 | 194457600 | 2000 | |
| 32184234 | antkhorin | G | Nov. 10, 2017, 2:01 a.m. | OK | Java 8 | TESTS | 141 | 764 | 123699200 | 2000 | |
| 43429400 | BaZ_ | G | Sept. 25, 2018, 11:22 p.m. | OK | Java 8 | TESTS | 141 | 858 | 186265600 | 2000 | |
| 31905111 | 4mda4mda | G | Oct. 30, 2017, 8:24 p.m. | OK | Java 8 | TESTS | 141 | 904 | 72089600 | 2000 | |
| 54005624 | wadissimo | G | May 11, 2019, 7:42 p.m. | OK | Java 8 | TESTS | 141 | 997 | 158822400 | 2000 | |
| 31583871 | svxf | G | Oct. 21, 2017, 6:39 p.m. | OK | Java 8 | TESTS | 141 | 998 | 138752000 | 2000 | |
| 31590466 | tmwilliamlin168 | G | Oct. 22, 2017, 2:56 a.m. | OK | Java 8 | TESTS | 141 | 1013 | 111411200 | 2000 | |
| 31693411 | di_halt | G | Oct. 24, 2017, 8:25 p.m. | OK | Java 8 | TESTS | 141 | 1013 | 143257600 | 2000 | |
| 32088315 | cvm | G | Nov. 6, 2017, 6:29 a.m. | OK | Java 8 | TESTS | 141 | 1044 | 186470400 | 2000 | |
| 31686771 | Sharon Carson BiIIy | G | Oct. 24, 2017, 3:21 p.m. | OK | Java 8 | TESTS | 141 | 1075 | 244838400 | 2000 | |
| 31860562 | og.kostya | G | Oct. 29, 2017, 8:39 a.m. | OK | MS C# | TESTS | 141 | 389 | 55398400 | 2000 | |
| 31698844 | AymanWizard | G | Oct. 25, 2017, 4:52 a.m. | OK | MS C# | TESTS | 141 | 1092 | 51507200 | 2000 | |
| 53615753 | vjudge5 | G | May 1, 2019, 2:45 p.m. | OK | MS C++ | TESTS | 141 | 171 | 13824000 | 2000 | |
| 69227196 | vjudge2 | G | Jan. 21, 2020, 7:49 a.m. | OK | MS C++ | TESTS | 141 | 389 | 28979200 | 2000 | |
| 31626919 | AleksanderBalobanov | G | Oct. 23, 2017, 11:35 a.m. | OK | MS C++ | TESTS | 141 | 389 | 29286400 | 2000 | |
| 31875872 | Maffka | G | Oct. 29, 2017, 7:32 p.m. | OK | MS C++ | TESTS | 141 | 608 | 36556800 | 2000 | |
| 31856507 | AleksandraZh out111 ZloyNegr | G | Oct. 29, 2017, 5:29 a.m. | OK | MS C++ | TESTS | 141 | 764 | 29388800 | 2000 | |
| 31611579 | dmitry74 | G | Oct. 22, 2017, 6:37 p.m. | OK | MS C++ | TESTS | 141 | 780 | 20582400 | 2000 | |
| 31594841 | bybag miha715lev sand-martin | G | Oct. 22, 2017, 7:10 a.m. | OK | MS C++ | TESTS | 141 | 810 | 32768000 | 2000 | |
| 36128336 | nik1998 | G | March 9, 2018, 7:29 p.m. | OK | MS C++ | TESTS | 141 | 842 | 46592000 | 2000 | |
| 31864562 | Vfhb Yippie OljaV | G | Oct. 29, 2017, 11:17 a.m. | OK | MS C++ | TESTS | 141 | 1138 | 55193600 | 2000 | |
| 31945311 | 11fingers | G | Nov. 1, 2017, 10:06 a.m. | OK | Python 2 | TESTS | 141 | 2089 | 71270400 | 2000 | |
| 39401738 | Ali_Pi | G | June 19, 2018, 7:24 a.m. | OK | Python 2 | TESTS | 141 | 2636 | 98611200 | 2000 | |
| 31593453 | ytz123 | G | Oct. 22, 2017, 6:18 a.m. | OK | Python 2 | TESTS | 141 | 2994 | 107212800 | 2000 |
Back to search problems