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 |
---|---|---|---|---|---|---|
1081 | Avito Cool Challenge 2018 | FINISHED | False | 9000 | 192554723 | Dec. 16, 2018, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4208 ) | D | Maximum Distance | PROGRAMMING | ds graphs shortest paths sortings | 1800 |
B"Chouti was tired of the tedious homework, so he opened up an old programming problem he created years ago. You are given a connected undirected graph with n vertices and m weighted edges. There are k special vertices: x_1, x_2, ldots, x_k . Let's define the cost of the path as the maximum weight of the edges in it. And the distance between two vertexes as the minimum cost of the paths connecting them. For each special vertex, find another special vertex which is farthest from it (in terms of the previous paragraph, i.e. the corresponding distance is maximum possible) and output the distance between them. The original constraints are really small so he thought the problem was boring. Now, he raises the constraints and hopes you can solve it for him. The first line contains three integers n , m and k ( 2 <= q k <= q n <= q 10^5 , n-1 <= q m <= q 10^5 ) -- the number of vertices, the number of edges and the number of special vertices. The second line contains k distinct integers x_1, x_2, ldots, x_k ( 1 <= q x_i <= q n ). Each of the following m lines contains three integers u , v and w ( 1 <= q u,v <= q n, 1 <= q w <= q 10^9 ), denoting there is an edge between u and v of weight w . The given graph is undirected, so an edge (u, v) can be used in the both directions. The graph may have multiple edges and self-loops. It is guaranteed, that the graph is connected. The first and only line should contain k integers. The i -th integer is the distance between x_i and the farthest special vertex from it. In the first example, the distance between vertex 1 and 2 equals to 2 because one can walk through the edge of weight 2 connecting them. So the distance to the farthest node for both 1 and 2 equals to 2 . In the second example, one can find that distance between 1 and 2 , distance "... |
63888 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
47143963 | sansen | D | Dec. 16, 2018, 11:13 p.m. | OK | GNU C11 | TESTS | 101 | 405 | 3174400 | 1800 | |
47129399 | zysbzddsj | D | Dec. 16, 2018, 4:08 p.m. | OK | GNU C11 | TESTS | 101 | 451 | 9625600 | 1800 | |
47170794 | Tgiwx | D | Dec. 17, 2018, 2:52 p.m. | OK | GNU C++11 | TESTS | 101 | 46 | 2252800 | 1800 | |
49301723 | luogu_bot2 | D | Feb. 1, 2019, 3:30 a.m. | OK | GNU C++11 | TESTS | 102 | 46 | 2355200 | 1800 | |
47115042 | wzp666 | D | Dec. 16, 2018, 2:49 p.m. | OK | GNU C++11 | TESTS | 101 | 46 | 2662400 | 1800 | |
67603188 | Jimmy_Liu | D | Dec. 25, 2019, 12:39 p.m. | OK | GNU C++11 | TESTS | 102 | 46 | 2662400 | 1800 | |
48655323 | ReaLNero1 | D | Jan. 21, 2019, 2:11 a.m. | OK | GNU C++11 | TESTS | 102 | 46 | 2662400 | 1800 | |
47453482 | LJC00118 | D | Dec. 24, 2018, 11:12 a.m. | OK | GNU C++11 | TESTS | 102 | 46 | 4812800 | 1800 | |
48500845 | qwsin | D | Jan. 17, 2019, 3 p.m. | OK | GNU C++11 | TESTS | 102 | 46 | 5222400 | 1800 | |
47145846 | wh_ZH | D | Dec. 17, 2018, 2:12 a.m. | OK | GNU C++11 | TESTS | 101 | 61 | 2048000 | 1800 | |
47234751 | fanache99 | D | Dec. 18, 2018, 7:52 p.m. | OK | GNU C++11 | TESTS | 101 | 61 | 2252800 | 1800 | |
47146134 | ohweonfire | D | Dec. 17, 2018, 2:34 a.m. | OK | GNU C++11 | TESTS | 101 | 61 | 3993600 | 1800 | |
47250455 | zjB_shadow | D | Dec. 19, 2018, 8 a.m. | OK | GNU C++14 | TESTS | 101 | 61 | 2048000 | 1800 | |
47122061 | WAAutoMaton | D | Dec. 16, 2018, 3:20 p.m. | OK | GNU C++14 | TESTS | 101 | 61 | 19251200 | 1800 | |
47150053 | ytriayggg | D | Dec. 17, 2018, 6:14 a.m. | OK | GNU C++14 | TESTS | 101 | 93 | 2048000 | 1800 | |
47149850 | Origenes | D | Dec. 17, 2018, 6:06 a.m. | OK | GNU C++14 | TESTS | 101 | 93 | 4096000 | 1800 | |
47139529 | tfg102 | D | Dec. 16, 2018, 7:23 p.m. | OK | GNU C++14 | TESTS | 101 | 93 | 20070400 | 1800 | |
51570720 | RNS_MHB | D | March 20, 2019, 11:29 a.m. | OK | GNU C++14 | TESTS | 102 | 108 | 2048000 | 1800 | |
64182203 | trieuthanhi4869 | D | Nov. 4, 2019, 1:56 a.m. | OK | GNU C++14 | TESTS | 102 | 108 | 2048000 | 1800 | |
47122301 | top34051 | D | Dec. 16, 2018, 3:21 p.m. | OK | GNU C++14 | TESTS | 101 | 108 | 2457600 | 1800 | |
47120377 | ugly2333 | D | Dec. 16, 2018, 3:12 p.m. | OK | GNU C++14 | TESTS | 101 | 108 | 2662400 | 1800 | |
47144142 | Kuroni | D | Dec. 16, 2018, 11:30 p.m. | OK | GNU C++14 | TESTS | 101 | 108 | 3174400 | 1800 | |
47115436 | FizzyDavid | D | Dec. 16, 2018, 2:51 p.m. | OK | GNU C++17 | TESTS | 101 | 93 | 3788800 | 1800 | |
54579836 | LongChampion | D | May 25, 2019, 3:45 a.m. | OK | GNU C++17 | TESTS | 102 | 108 | 1740800 | 1800 | |
47145067 | 15owzLy1 | D | Dec. 17, 2018, 1:05 a.m. | OK | GNU C++17 | TESTS | 101 | 108 | 1945600 | 1800 | |
47146551 | CaNDidaTE_FaSTer | D | Dec. 17, 2018, 3:03 a.m. | OK | GNU C++17 | TESTS | 101 | 108 | 2048000 | 1800 | |
47444670 | P___ | D | Dec. 24, 2018, 5:17 a.m. | OK | GNU C++17 | TESTS | 102 | 108 | 2150400 | 1800 | |
50470463 | jaehyunp312 | D | Feb. 24, 2019, 11:49 p.m. | OK | GNU C++17 | TESTS | 102 | 108 | 2867200 | 1800 | |
53824468 | pedroteosousa | D | May 6, 2019, 3:10 p.m. | OK | GNU C++17 | TESTS | 102 | 108 | 3584000 | 1800 | |
49549887 | linkRs | D | Feb. 7, 2019, 4:45 a.m. | OK | GNU C++17 | TESTS | 102 | 108 | 3891200 | 1800 | |
47890783 | Phoenix1369 | D | Jan. 4, 2019, 6:20 a.m. | OK | GNU C++17 | TESTS | 102 | 108 | 3993600 | 1800 | |
58567310 | Againstmoon | D | Aug. 11, 2019, 8:33 a.m. | OK | GNU C++17 | TESTS | 102 | 108 | 21606400 | 1800 | |
47297343 | stefan.sakalik | D | Dec. 20, 2018, 12:37 p.m. | OK | Go | TESTS | 101 | 717 | 9830400 | 1800 | |
47131854 | uwi | D | Dec. 16, 2018, 4:28 p.m. | OK | Java 8 | TESTS | 101 | 187 | 0 | 1800 | |
47145518 | xodiac | D | Dec. 17, 2018, 1:46 a.m. | OK | Java 8 | TESTS | 101 | 202 | 0 | 1800 | |
47117443 | eatmore | D | Dec. 16, 2018, 2:59 p.m. | OK | Java 8 | TESTS | 101 | 202 | 0 | 1800 | |
47183064 | StayAwayFromBitches | D | Dec. 17, 2018, 11:56 p.m. | OK | Java 8 | TESTS | 101 | 217 | 5427200 | 1800 | |
47349862 | flyman3046 | D | Dec. 22, 2018, 1:11 a.m. | OK | Java 8 | TESTS | 101 | 218 | 0 | 1800 | |
47168450 | aman28rwt | D | Dec. 17, 2018, 1:42 p.m. | OK | Java 8 | TESTS | 101 | 218 | 5939200 | 1800 | |
47361003 | Ahmed_Diab | D | Dec. 22, 2018, 8:43 a.m. | OK | Java 8 | TESTS | 101 | 233 | 0 | 1800 | |
49739079 | Shaykhutdinov-T-I | D | Feb. 10, 2019, 6:24 p.m. | OK | Java 8 | TESTS | 102 | 233 | 0 | 1800 | |
47127988 | wadissimo | D | Dec. 16, 2018, 3:58 p.m. | OK | Java 8 | TESTS | 101 | 233 | 0 | 1800 | |
47378063 | Ajudiya_13 | D | Dec. 22, 2018, 6:45 p.m. | OK | Java 8 | TESTS | 101 | 233 | 4915200 | 1800 | |
47128487 | Sergey.Bankevich | D | Dec. 16, 2018, 4:01 p.m. | OK | Kotlin | TESTS | 101 | 280 | 3584000 | 1800 | |
64623021 | satyamcse | D | Nov. 10, 2019, 7:35 a.m. | OK | Kotlin | TESTS | 102 | 296 | 3174400 | 1800 | |
59657283 | og.kostya | D | Aug. 29, 2019, 11 a.m. | OK | Mono C# | TESTS | 102 | 124 | 5017600 | 1800 | |
47149115 | Coder_D | D | Dec. 17, 2018, 5:33 a.m. | OK | Mono C# | TESTS | 101 | 529 | 16179200 | 1800 | |
47129840 | omikad | D | Dec. 16, 2018, 4:12 p.m. | OK | Mono C# | TESTS | 101 | 951 | 27955200 | 1800 | |
58383483 | vjudge5 | D | Aug. 6, 2019, 10:59 a.m. | OK | MS C++ | TESTS | 102 | 93 | 4608000 | 1800 | |
58373703 | vjudge2 | D | Aug. 6, 2019, 7:32 a.m. | OK | MS C++ | TESTS | 102 | 93 | 4608000 | 1800 | |
49385907 | scorpiowf | D | Feb. 3, 2019, 6:50 a.m. | OK | MS C++ | TESTS | 102 | 93 | 6963200 | 1800 | |
58378150 | vjudge1 | D | Aug. 6, 2019, 8:56 a.m. | OK | MS C++ | TESTS | 102 | 108 | 2662400 | 1800 | |
58376270 | vjudge4 | D | Aug. 6, 2019, 8:22 a.m. | OK | MS C++ | TESTS | 102 | 109 | 3481600 | 1800 | |
58410053 | vjudge3 | D | Aug. 7, 2019, 1:02 a.m. | OK | MS C++ | TESTS | 102 | 109 | 36044800 | 1800 | |
47132444 | r57shell | D | Dec. 16, 2018, 4:33 p.m. | OK | MS C++ | TESTS | 101 | 139 | 12697600 | 1800 | |
47117073 | LoneFox | D | Dec. 16, 2018, 2:57 p.m. | OK | MS C++ | TESTS | 101 | 171 | 2457600 | 1800 | |
47132302 | wladekp | D | Dec. 16, 2018, 4:32 p.m. | OK | MS C++ | TESTS | 101 | 342 | 2048000 | 1800 | |
47122806 | bunos | D | Dec. 16, 2018, 3:24 p.m. | OK | MS C++ | TESTS | 101 | 358 | 7270400 | 1800 | |
69030197 | AleksanderBalobanov | D | Jan. 18, 2020, 7:58 a.m. | OK | MS C++ 2017 | TESTS | 102 | 140 | 99532800 | 1800 | |
49606974 | pill | D | Feb. 7, 2019, 8:06 p.m. | OK | MS C++ 2017 | TESTS | 102 | 374 | 4300800 | 1800 | |
69844182 | Kirja_ES | D | Jan. 30, 2020, 1:56 p.m. | OK | MS C++ 2017 | TESTS | 102 | 592 | 14233600 | 1800 | |
47139998 | pajenegod | D | Dec. 16, 2018, 7:34 p.m. | OK | PyPy 2 | TESTS | 101 | 624 | 25702400 | 1800 | |
47184071 | pavankatta | D | Dec. 18, 2018, 1:53 a.m. | OK | PyPy 2 | TESTS | 101 | 919 | 22118400 | 1800 | |
47440354 | czasem_tak_trzeba | D | Dec. 23, 2018, 11:42 p.m. | OK | PyPy 3 | TESTS | 102 | 748 | 32153600 | 1800 | |
47440491 | czasem_tak_trzeba | D | Dec. 23, 2018, 11:57 p.m. | OK | PyPy 3 | TESTS | 102 | 764 | 31436800 | 1800 | |
47454937 | czasem_tak_trzeba | D | Dec. 24, 2018, 11:59 a.m. | OK | PyPy 3 | TESTS | 102 | 764 | 49049600 | 1800 | |
47142255 | titia | D | Dec. 16, 2018, 8:58 p.m. | OK | PyPy 3 | TESTS | 101 | 779 | 30515200 | 1800 | |
47170923 | ankit_06 | D | Dec. 17, 2018, 2:55 p.m. | OK | Python 2 | TESTS | 101 | 795 | 18329600 | 1800 | |
47168321 | pa.n.ik | D | Dec. 17, 2018, 1:39 p.m. | OK | Python 2 | TESTS | 101 | 904 | 17715200 | 1800 | |
54572474 | rainerh | D | May 24, 2019, 8:16 p.m. | OK | Python 3 | TESTS | 102 | 638 | 17305600 | 1800 | |
54859557 | vjudge2 | D | May 30, 2019, 11:38 p.m. | OK | Python 3 | TESTS | 102 | 654 | 17305600 | 1800 | |
54572542 | vjudge4 | D | May 24, 2019, 8:18 p.m. | OK | Python 3 | TESTS | 102 | 654 | 17305600 | 1800 | |
47140817 | ivan100sic | D | Dec. 16, 2018, 7:58 p.m. | OK | Python 3 | TESTS | 101 | 733 | 14745600 | 1800 | |
54081296 | vjudge2 | D | May 14, 2019, 3:24 a.m. | OK | Python 3 | TESTS | 102 | 748 | 15257600 | 1800 | |
47142296 | titia | D | Dec. 16, 2018, 9 p.m. | OK | Python 3 | TESTS | 101 | 811 | 34201600 | 1800 | |
53480466 | mihalykoandras | D | April 28, 2019, 7:21 p.m. | OK | Python 3 | TESTS | 102 | 826 | 15769600 | 1800 | |
53477993 | shanetamas95 | D | April 28, 2019, 5:03 p.m. | OK | Python 3 | TESTS | 102 | 841 | 15769600 | 1800 | |
47447994 | sy_chen | D | Dec. 24, 2018, 7:41 a.m. | OK | Python 3 | TESTS | 102 | 841 | 16076800 | 1800 | |
58153876 | NocturneBflat | D | Aug. 2, 2019, 4:26 a.m. | OK | Python 3 | TESTS | 102 | 998 | 24064000 | 1800 | |
47131959 | yakamoto | D | Dec. 16, 2018, 4:29 p.m. | OK | Scala | TESTS | 101 | 717 | 6144000 | 1800 |
Back to search problems