Hello 2025

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
2057 Hello 2025 FINISHED False 9000 40404322 Jan. 4, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 1905 ) E2 Another Exercise on Graphs (hard version) PROGRAMMING binary search brute force dsu graphs shortest paths sortings trees

This is the hard version of the problem. The difference between the versions is that in this version, there is no additional constraint on (m). You can hack only if you solved all versions of this problem. Recently, the instructors of "T-generation" needed to create a training contest. They were missing one problem, and there was not a single problem on graphs in the contest, so they came up with the following problem. You are given a connected weighted undirected graph with (n) vertices and (m) edges, which does not contain self-loops or multiple edges. There are (q) queries of the form ((a, b, k)): among all paths from vertex (a) to vertex (b), find the smallest (k)-th maximum weight of edges on the path(^{\dagger}). The instructors thought that the problem sounded very interesting, but there is one catch. They do not know how to solve it. Help them and solve the problem, as there are only a few hours left until the contest starts. (^{\dagger}) Let (w_1 \ge w_2 \ge \ldots \ge w_{h}) be the weights of all edges in a path, in non-increasing order. The (k)-th maximum weight of the edges on this path is (w_{k}). Each test contains multiple test cases. The first line contains a single integer (t) ((1 \le t \le 100)) — the number of test cases. The description of the test cases follows. The first line of each set of test case contains three integers (n, m) and (q) ((2 \le n \le 400), (n - 1 \le m \le \frac{n \cdot (n - 1)}{2}), (1 \le q \le 3 \cdot 10^5)) — the number of vertices, the number of edges, and the number of questions, respectively. Each of the following (m) lines of each set of test case contains three integers (v, u) and (w) ((1 \le v, u \le n), (1 \le w \le 10^9)) — the ends of the next edge of the graph and its weight, respectively. It is guaranteed that the graph does not contain self-loops and multiple edges. Each of the following (q) lines

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
299702152 papa3 E2 Jan. 4, 2025, 7:39 p.m. OK C++17 (GCC 7-32) TESTS 36 562 1536000
299720139 linanchen E2 Jan. 5, 2025, 3:16 a.m. OK C++17 (GCC 7-32) TESTS 36 640 268288000
299688020 danya111 E2 Jan. 4, 2025, 5:03 p.m. OK C++17 (GCC 7-32) TESTS 36 656 257228800
299719362 daniel604 E2 Jan. 5, 2025, 2:58 a.m. OK C++17 (GCC 7-32) TESTS 36 656 257843200
299720896 TianyiWei E2 Jan. 5, 2025, 3:32 a.m. OK C++17 (GCC 7-32) TESTS 36 671 268288000
299685284 radoslav11 E2 Jan. 4, 2025, 4:57 p.m. OK C++17 (GCC 7-32) TESTS 36 687 277913600
299716916 incra E2 Jan. 5, 2025, 1:56 a.m. OK C++17 (GCC 7-32) TESTS 36 687 278835200
299730912 nai_he E2 Jan. 5, 2025, 5:59 a.m. OK C++17 (GCC 7-32) TESTS 36 702 365260800
299696852 skywalkert E2 Jan. 4, 2025, 6:47 p.m. OK C++17 (GCC 7-32) TESTS 36 733 275251200
299695953 CodigoL E2 Jan. 4, 2025, 6:39 p.m. OK C++17 (GCC 7-32) TESTS 36 749 137113600
299715295 enslaved E2 Jan. 5, 2025, 1 a.m. OK C++20 (GCC 13-64) TESTS 36 530 18124800
299719365 wenqizhi E2 Jan. 5, 2025, 2:58 a.m. OK C++20 (GCC 13-64) TESTS 36 562 9420800
299711052 Kalashyan E2 Jan. 4, 2025, 10:22 p.m. OK C++20 (GCC 13-64) TESTS 36 562 267059200
299687939 furry E2 Jan. 4, 2025, 5:03 p.m. OK C++20 (GCC 13-64) TESTS 36 578 270131200
299714954 MvKaio E2 Jan. 5, 2025, 12:45 a.m. OK C++20 (GCC 13-64) TESTS 36 624 259788800
299683117 lhy123 E2 Jan. 4, 2025, 4:52 p.m. OK C++20 (GCC 13-64) TESTS 36 639 275148800
299718950 _rainygame_ E2 Jan. 5, 2025, 2:48 a.m. OK C++20 (GCC 13-64) TESTS 36 640 268288000
299712968 MR_NoSolution E2 Jan. 4, 2025, 11:28 p.m. OK C++20 (GCC 13-64) TESTS 36 640 271974400
299703650 cockatooo_2025GM E2 Jan. 4, 2025, 7:56 p.m. OK C++20 (GCC 13-64) TESTS 36 655 14848000
299721041 Jlyfish E2 Jan. 5, 2025, 3:34 a.m. OK C++20 (GCC 13-64) TESTS 36 671 269926400
299711174 kessido E2 Jan. 4, 2025, 10:26 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 406 137113600
299710424 kessido E2 Jan. 4, 2025, 10:03 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 406 137113600
299711646 kessido E2 Jan. 4, 2025, 10:41 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 406 137318400
299709807 kessido E2 Jan. 4, 2025, 9:47 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 421 137318400
299710847 kessido E2 Jan. 4, 2025, 10:16 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 437 265318400
299710916 kessido E2 Jan. 4, 2025, 10:18 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 437 265523200
299711386 kessido E2 Jan. 4, 2025, 10:33 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 452 137318400
299710264 kessido E2 Jan. 4, 2025, 9:59 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 452 137318400
299711660 kessido E2 Jan. 4, 2025, 10:42 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 468 137318400
299711142 kessido E2 Jan. 4, 2025, 10:26 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 468 265523200
299710344 rainboy E2 Jan. 4, 2025, 10:02 p.m. OK GNU C11 TESTS 36 1983 6860800
299705423 31536000 E2 Jan. 4, 2025, 8:21 p.m. OK Java 21 TESTS 36 2405 495206400
299717347 darkkcyan E2 Jan. 5, 2025, 2:08 a.m. OK Rust 2021 TESTS 36 1109 17920000
299717103 darkkcyan E2 Jan. 5, 2025, 2:02 a.m. OK Rust 2021 TESTS 36 1577 49664000
299717227 VSS201672_Khawar E2 Jan. 5, 2025, 2:04 a.m. OK Rust 2021 TESTS 36 1608 49561600
299683184 darkkcyan E2 Jan. 4, 2025, 4:52 p.m. OK Rust 2021 TESTS 36 2280 37888000

remove filters

Back to search problems