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 |
|---|---|---|---|---|---|---|
| 1045 | Bubble Cup 11 - Finals [Online Mirror, Div. 1] | FINISHED | False | 18000 | 238793123 | Sept. 22, 2018, 10:35 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 827 ) | C | Hyperspace Highways | PROGRAMMING | dfs and similar graphs trees | 2500 |
In an unspecified solar system, there are (N) planets. A space government company has recently hired space contractors to build (M) bidirectional Hyperspace™ highways, each connecting two different planets. The primary objective, which was to make sure that every planet can be reached from any other planet taking only Hyperspace™ highways, has been completely fulfilled. Unfortunately, lots of space contractors had friends and cousins in the Space Board of Directors of the company, so the company decided to do much more than just connecting all planets. In order to make spending enormous amounts of space money for Hyperspace™ highways look neccessary, they decided to enforce a strict rule on the Hyperspace™ highway network: whenever there is a way to travel through some planets and return to the starting point without travelling through any planet twice, every pair of planets on the itinerary should be directly connected by a Hyperspace™ highway. In other words, the set of planets in every simple cycle induces a complete subgraph. You are designing a Hyperspace™ navigational app, and the key technical problem you are facing is finding the minimal number of Hyperspace™ highways one needs to use to travel from planet (A) to planet (B). As this problem is too easy for Bubble Cup, here is a harder task: your program needs to do it for (Q) pairs of planets. The first line contains three positive integers (N) ((1\leq N\leq 100\,000)), (M) ((1\leq M\leq 500\,000)) and (Q) ((1\leq Q\leq 200\,000)), denoting the number of planets, the number of Hyperspace™ highways, and the number of queries, respectively. Each of the following M lines contains a highway: highway (i) is given by two integers (u_i) and (v_i) ((1 \leq u_i < v_i \leq N)), meaning the planets (u_i) and (v_i) are connected by a Hyperspace™ highway. It is guaranteed that the network of planets and Hyperspace™ highways forms a simple conne |
| Tutorial (PDF) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 46487800 | djh123 | C | Dec. 2, 2018, 9:42 a.m. | OK | GNU C++11 | TESTS | 19 | 108 | 44339200 | 2500 | |
| 51286133 | darkfire | C | March 14, 2019, 7:22 a.m. | OK | GNU C++11 | TESTS | 19 | 109 | 79564800 | 2500 | |
| 51286088 | darkfire | C | March 14, 2019, 7:20 a.m. | OK | GNU C++11 | TESTS | 19 | 109 | 79564800 | 2500 | |
| 55722382 | luogu_bot2 | C | June 18, 2019, 3:57 p.m. | OK | GNU C++11 | TESTS | 19 | 124 | 24268800 | 2500 | |
| 50213093 | SGColin | C | Feb. 20, 2019, 2:04 a.m. | OK | GNU C++11 | TESTS | 19 | 124 | 24268800 | 2500 | |
| 46755634 | mtmohim | C | Dec. 8, 2018, 11:34 a.m. | OK | GNU C++11 | TESTS | 19 | 124 | 45977600 | 2500 | |
| 44751553 | ReaLNero1 | C | Oct. 23, 2018, 8:13 p.m. | OK | GNU C++11 | TESTS | 19 | 124 | 45977600 | 2500 | |
| 43413771 | luogu_bot5 | C | Sept. 25, 2018, 2:33 p.m. | OK | GNU C++11 | TESTS | 19 | 124 | 45977600 | 2500 | |
| 43262615 | Tyheee Cyhlnj darkfire | C | Sept. 22, 2018, 3:16 p.m. | OK | GNU C++11 | TESTS | 19 | 124 | 45977600 | 2500 | |
| 50895495 | fzszchy2001 | C | March 6, 2019, 2:53 p.m. | OK | GNU C++11 | TESTS | 19 | 124 | 100659200 | 2500 | |
| 44536493 | lunch | C | Oct. 19, 2018, 9:10 a.m. | OK | GNU C++14 | TESTS | 19 | 140 | 47206400 | 2500 | |
| 44536531 | lunch | C | Oct. 19, 2018, 9:11 a.m. | OK | GNU C++14 | TESTS | 19 | 155 | 48025600 | 2500 | |
| 44448940 | polequoll | C | Oct. 17, 2018, 3:02 p.m. | OK | GNU C++14 | TESTS | 19 | 265 | 69529600 | 2500 | |
| 44954066 | chemthan | C | Oct. 27, 2018, 1:25 p.m. | OK | GNU C++14 | TESTS | 19 | 311 | 22528000 | 2500 | |
| 46752641 | zjhqg2005 | C | Dec. 8, 2018, 9:59 a.m. | OK | GNU C++14 | TESTS | 19 | 311 | 36044800 | 2500 | |
| 52515063 | Christopher_Liu | C | April 9, 2019, 4:34 a.m. | OK | GNU C++14 | TESTS | 19 | 311 | 41472000 | 2500 | |
| 50549285 | ffern | C | Feb. 27, 2019, 2:10 a.m. | OK | GNU C++14 | TESTS | 19 | 327 | 33996800 | 2500 | |
| 49989929 | vjudge4 | C | Feb. 16, 2019, 12:18 p.m. | OK | GNU C++14 | TESTS | 19 | 327 | 36556800 | 2500 | |
| 45426079 | rawatds | C | Nov. 7, 2018, 8:59 p.m. | OK | GNU C++14 | TESTS | 19 | 327 | 71270400 | 2500 | |
| 45432488 | little_waxberry | C | Nov. 8, 2018, 5:23 a.m. | OK | GNU C++14 | TESTS | 19 | 327 | 89395200 | 2500 | |
| 43432147 | DZYO | C | Sept. 26, 2018, 2:24 a.m. | OK | GNU C++17 | TESTS | 19 | 202 | 52019200 | 2500 | |
| 43652170 | kulpet345 353cerega kvk1920 | C | Oct. 1, 2018, 4:14 p.m. | OK | GNU C++17 | TESTS | 19 | 218 | 37888000 | 2500 | |
| 52515074 | vjudge5 | C | April 9, 2019, 4:35 a.m. | OK | GNU C++17 | TESTS | 19 | 312 | 42393600 | 2500 | |
| 46987630 | markotee | C | Dec. 13, 2018, 9:58 p.m. | OK | GNU C++17 | TESTS | 19 | 327 | 31539200 | 2500 | |
| 46991432 | szawinis | C | Dec. 14, 2018, 4:46 a.m. | OK | GNU C++17 | TESTS | 19 | 327 | 34816000 | 2500 | |
| 64699489 | despair | C | Nov. 11, 2019, 2:23 p.m. | OK | GNU C++17 | TESTS | 19 | 327 | 37068800 | 2500 | |
| 69845570 | Ari | C | Jan. 30, 2020, 2:15 p.m. | OK | GNU C++17 | TESTS | 19 | 327 | 45260800 | 2500 | |
| 66166516 | jociy72818 | C | Dec. 2, 2019, 7:54 a.m. | OK | GNU C++17 | TESTS | 19 | 327 | 50380800 | 2500 | |
| 60159995 | tanphatls987 | C | Sept. 6, 2019, 8:35 a.m. | OK | GNU C++17 | TESTS | 19 | 343 | 40140800 | 2500 | |
| 43266982 | MaxZubec | C | Sept. 22, 2018, 4:58 p.m. | OK | GNU C++17 | TESTS | 19 | 343 | 67276800 | 2500 | |
| 43253993 | uwi | C | Sept. 22, 2018, 1:02 p.m. | OK | Java 8 | TESTS | 19 | 483 | 44646400 | 2500 | |
| 57961781 | SpargelTarzan | C | July 29, 2019, 11:32 p.m. | OK | Java 8 | TESTS | 19 | 764 | 96768000 | 2500 |
Back to search problems