2026 ICPC Asia Pacific Championship - Online Mirror (Unrated, Online Mirror, ICPC Rules, Teams Preferred)

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
2206 2026 ICPC Asia Pacific Championship - Online Mirror (Unrated, Online Mirror, ICPC Rules, Teams Preferred) FINISHED False 18000 3471323 March 8, 2026, 1:45 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 576 ) C Upside Down Dijkstra PROGRAMMING dfs and similar

Your little sibling has a connected undirected graph of (n) vertices and (m) edges. The vertices are numbered from (1) to (n), and the edges are numbered from (1) to (m). Edge (j) connects vertices (u_j) and (v_j) with a positive integer weight of (w_j). Your little sibling coded Dijkstra's algorithm to find the shortest distances from vertex (1) to all other vertices, as shown in the pseudocode below. The array (S) records the order in which each vertex is popped from the heap for the first time. Note that even though tuples for each vertex may be pushed multiple times into the heap, each vertex is added to (S) exactly once. However, your little sibling made a big mistake. In your sibling's code, the heap always pops the maximum tuple instead of the minimum tuple. Here, the heap orders tuples lexicographically by ((\mathit{dist}, u)), with larger (\mathit{dist}) considered larger; ties are broken by larger (u). Your little sibling shares the graph structure with you, that is, all pairs of (u_j) and (v_j) ((1 \le j \le m)). However, your sibling does not share the edge weights (w_j). Instead, your sibling shares an array (S = (s_1, s_2, \ldots, s_n)) with you and asks you to reconstruct the edge weights. Your task is to find integer edge weights (w_1, w_2, \ldots, w_m) ((1 \leq w_j \leq 10^9) for all (j)) such that running your sibling's incorrect code yields the given array (S). Find any such assignment of edge weights. If no such assignment exists, report that it is impossible. The first line of input contains two integers (n) and (m) ((2 \leq n \leq 100\,000); (n-1 \leq m \leq 200\,000)). The (j)-th of the next (m) lines contains two integers (u_j) and (v_j) ((1 \leq u_j \lt v_j \leq n); ((u_j, v_j) \neq (u_k, v_k)) for all (j \neq k)). The input guarantees that the graph is connected. The next line contains $$$

Tutorials

Tutorial (PDF)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
365797207 Yaronicee. C March 8, 2026, 3:30 a.m. OK C++17 (GCC 7-32) TESTS 97 218 7372800
365799580 CrossFire1 C March 8, 2026, 4:13 a.m. OK C++17 (GCC 7-32) TESTS 97 250 7577600
365839427 qwertyui66 C March 8, 2026, 11:25 a.m. OK C++17 (GCC 7-32) TESTS 97 250 11059200
365802477 hiteshjakhar__29 C March 8, 2026, 5:02 a.m. OK C++17 (GCC 7-32) TESTS 97 250 12390400
365808138 zoryn C March 8, 2026, 6:06 a.m. OK C++17 (GCC 7-32) TESTS 97 250 14233600
365809269 pinerush pinterestlover123 C March 8, 2026, 6:18 a.m. OK C++17 (GCC 7-32) TESTS 97 265 6860800
365798805 cse.scholarx C March 8, 2026, 4 a.m. OK C++17 (GCC 7-32) TESTS 97 281 11366400
365804890 1uChky Haphyxlos NDAKJin C March 8, 2026, 5:30 a.m. OK C++17 (GCC 7-32) TESTS 97 281 20582400
365910689 HanaYukii C March 8, 2026, 7:18 p.m. OK C++17 (GCC 7-32) TESTS 97 296 15564800
365804192 _el3bd_ C March 8, 2026, 5:22 a.m. OK C++17 (GCC 7-32) TESTS 97 375 58163200
365800671 hzbjr wttt907 xsjpx C March 8, 2026, 4:32 a.m. OK C++20 (GCC 13-64) TESTS 97 156 17920000
365823434 how_to_LGM C March 8, 2026, 8:47 a.m. OK C++20 (GCC 13-64) TESTS 97 187 13414400
365801154 BrotherLouie C March 8, 2026, 4:40 a.m. OK C++20 (GCC 13-64) TESTS 97 203 9216000
365796258 prantogoswamee C March 8, 2026, 3:14 a.m. OK C++20 (GCC 13-64) TESTS 97 218 17715200
365794390 Amoo_Safar C March 8, 2026, 2:42 a.m. OK C++20 (GCC 13-64) TESTS 97 218 63795200
365812391 pyqjw1 C March 8, 2026, 6:50 a.m. OK C++20 (GCC 13-64) TESTS 97 234 12902400
365929905 Karuna C March 9, 2026, 1:30 a.m. OK C++20 (GCC 13-64) TESTS 97 234 17305600
365794976 Rubikun C March 8, 2026, 2:52 a.m. OK C++20 (GCC 13-64) TESTS 97 234 20480000
365795096 YeongTree 16silver Karuna C March 8, 2026, 2:54 a.m. OK C++20 (GCC 13-64) TESTS 97 234 23347200
365858516 ArSahar C March 8, 2026, 2:12 p.m. OK C++20 (GCC 13-64) TESTS 97 250 18227200
365805930 lzyrapx C March 8, 2026, 5:42 a.m. OK C++23 (GCC 14-64, msys2) TESTS 97 218 7270400
365913719 mohamedtarekfayez005 C March 8, 2026, 7:55 p.m. OK C++23 (GCC 14-64, msys2) TESTS 97 218 17817600
365848927 Ibrohim-Shamsiev C March 8, 2026, 1:01 p.m. OK C++23 (GCC 14-64, msys2) TESTS 97 218 17817600
365792754 ksun48 ecnerwala C March 8, 2026, 2:13 a.m. OK C++23 (GCC 14-64, msys2) TESTS 97 218 17817600
365794748 415411 C March 8, 2026, 2:48 a.m. OK C++23 (GCC 14-64, msys2) TESTS 97 218 60211200
365808040 benben181 atkubo C March 8, 2026, 6:05 a.m. OK C++23 (GCC 14-64, msys2) TESTS 97 234 9011200
365913823 czjxyz zacharychao kevin C March 8, 2026, 7:56 p.m. OK C++23 (GCC 14-64, msys2) TESTS 97 234 23859200
365831044 opozi C March 8, 2026, 10 a.m. OK C++23 (GCC 14-64, msys2) TESTS 97 234 27545600
365803835 sleepever C March 8, 2026, 5:18 a.m. OK C++23 (GCC 14-64, msys2) TESTS 97 234 30003200
365794433 Momotaros C March 8, 2026, 2:43 a.m. OK C++23 (GCC 14-64, msys2) TESTS 97 234 54681600
365816542 kevin_0911 C March 8, 2026, 7:33 a.m. OK Java 21 TESTS 97 906 55603200
365916775 golomb C March 8, 2026, 8:35 p.m. OK PyPy 3-64 TESTS 97 625 78745600
365844471 IcyGirl C March 8, 2026, 12:16 p.m. OK PyPy 3-64 TESTS 97 718 90931200
365817985 Sacred_Conqurer C March 8, 2026, 7:48 a.m. OK PyPy 3-64 TESTS 97 984 479744000
365806316 mikelou C March 8, 2026, 5:46 a.m. OK PyPy 3-64 TESTS 97 1281 83865600
365794839 sansen C March 8, 2026, 2:50 a.m. OK Rust 2021 TESTS 97 156 58470400
365856467 C March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856388 C March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856355 C March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856321 C March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856307 C March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856283 C March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856272 C March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856269 C March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856258 C March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856250 C March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0

remove filters

Back to search problems