2025 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams)

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
2172 2025 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) FINISHED False 18000 13147823 Nov. 16, 2025, 1:50 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 5696 ) M Maximum Distance To Port PROGRAMMING

There are (n) cities numbered from (1) to (n), connected by (m) bidirectional roads, each exactly (1) kilometer long. The road network forms a connected simple graph. Each city produces exactly one of (k) types of agricultural products, numbered from (1) to (k). City (1) is the main port where all products must be delivered. The government wants to estimate the worst-case transportation cost and time for exporting agricultural goods. To achieve this, they need to determine, for each product type, the longest among the shortest distances (in kilometers) from any city producing that product to the port city. Your task is to compute this maximum shortest distance for each product type. The first line contains three integers (n), (m), and (k), representing the number of cities, bidirectional roads, and product types, respectively. The second line contains (n) integers (a_1, a_2, \dots, a_n), where (a_i) is the product type produced by city (i). The (i)-th of the following (m) lines contains two integers (u_i) and (v_i), representing that the (i)-th bidirectional road connects cities (u_i) and (v_i). (1 \leq n \leq 2 \times 10^{5}) (0 \leq m \leq 2 \times 10^{5}) (1 \leq k \leq n) (1 \leq a_i \leq k) (1 \leq u_i, v_i \leq n) The graph is connected and simple (no self-loops or multiple edges). Every product type from (1) to (k) is produced by at least one city. Output (k) integers in a single line. The (i)-th integer should be the maximum shortest distance (in kilometers) from any city producing product (i) to the port city (1). Explanation of Example 2: Figure 1 illustrates this example. In this example, the port is the blue node. All goods of product type 5 are already in the port, so their transportation cost is 0. The transportation cost for product type 4 is higher. One city with product type 4 has a distance of 1 to the po

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
349228701 og.kostya M Nov. 16, 2025, 8:37 a.m. OK C# 10 TESTS 38 281 24166400
349228661 og.kostya M Nov. 16, 2025, 8:37 a.m. OK C# 13 TESTS 38 390 30924800
349203960 Albecepon M Nov. 16, 2025, 4:22 a.m. OK C# 13 TESTS 38 468 50176000
349196436 heccqwq M Nov. 16, 2025, 2:52 a.m. OK C++17 (GCC 7-32) TESTS 38 218 28057600
349193018 Sunyn M Nov. 16, 2025, 2:06 a.m. OK C++17 (GCC 7-32) TESTS 38 233 9830400
349220966 loser_lhd wjiay Lysea M Nov. 16, 2025, 7:22 a.m. OK C++17 (GCC 7-32) TESTS 38 249 7270400
349220391 ETalien404 M Nov. 16, 2025, 7:17 a.m. OK C++17 (GCC 7-32) TESTS 38 249 11161600
349214861 Swarnaaa M Nov. 16, 2025, 6:26 a.m. OK C++17 (GCC 7-32) TESTS 38 265 4300800
349229897 cube_escape M Nov. 16, 2025, 8:48 a.m. OK C++17 (GCC 7-32) TESTS 38 280 15257600
349203982 ftuknights M Nov. 16, 2025, 4:22 a.m. OK C++17 (GCC 7-32) TESTS 38 281 4300800
349211453 andrzejng2006 M Nov. 16, 2025, 5:54 a.m. OK C++17 (GCC 7-32) TESTS 38 281 4915200
349209316 devecent M Nov. 16, 2025, 5:32 a.m. OK C++17 (GCC 7-32) TESTS 38 296 3584000
349199320 singhgauravgzp M Nov. 16, 2025, 3:30 a.m. OK C++17 (GCC 7-32) TESTS 38 296 4300800
349193309 sunxuanyu xiaoyuhao xinxin2024 M Nov. 16, 2025, 2:10 a.m. OK C++20 (GCC 13-64) TESTS 38 156 6451200
349204588 Aniket_Jawarkar86 M Nov. 16, 2025, 4:31 a.m. OK C++20 (GCC 13-64) TESTS 38 171 3276800
349215062 Edwardschao M Nov. 16, 2025, 6:28 a.m. OK C++20 (GCC 13-64) TESTS 38 202 6451200
349193291 XYZ303 tommy_jin M Nov. 16, 2025, 2:09 a.m. OK C++20 (GCC 13-64) TESTS 38 202 56115200
349195385 ilovedao fzjsx xiaogan881 M Nov. 16, 2025, 2:37 a.m. OK C++20 (GCC 13-64) TESTS 38 218 12902400
349217970 CorporalXiaoxiaoguai M Nov. 16, 2025, 6:54 a.m. OK C++20 (GCC 13-64) TESTS 38 249 6963200
349193481 Anfelesan M Nov. 16, 2025, 2:12 a.m. OK C++20 (GCC 13-64) TESTS 38 249 6963200
349200764 Muzammil_Mughal Taimoor_yazmani M Nov. 16, 2025, 3:44 a.m. OK C++20 (GCC 13-64) TESTS 38 250 6860800
349193197 tabr M Nov. 16, 2025, 2:08 a.m. OK C++20 (GCC 13-64) TESTS 38 265 6860800
349213406 sayuridate M Nov. 16, 2025, 6:12 a.m. OK C++20 (GCC 13-64) TESTS 38 265 7065600
349192214 CCCCOrz OdtreeKing zhangtianhan M Nov. 16, 2025, 1:56 a.m. OK C++23 (GCC 14-64, msys2) TESTS 38 171 8089600
349206563 wuchenyu01 M Nov. 16, 2025, 4:59 a.m. OK C++23 (GCC 14-64, msys2) TESTS 38 171 24064000
349193701 YipChip chllo777 Woxuanyi M Nov. 16, 2025, 2:15 a.m. OK C++23 (GCC 14-64, msys2) TESTS 38 186 7270400
349193863 415411 M Nov. 16, 2025, 2:17 a.m. OK C++23 (GCC 14-64, msys2) TESTS 38 202 22118400
349195240 namsee1 Kiffaz M Nov. 16, 2025, 2:36 a.m. OK C++23 (GCC 14-64, msys2) TESTS 38 218 7168000
349216856 pookieblinders itz_priyank DNCoding2112 M Nov. 16, 2025, 6:43 a.m. OK C++23 (GCC 14-64, msys2) TESTS 38 234 7065600
349194840 binminh01 M Nov. 16, 2025, 2:30 a.m. OK C++23 (GCC 14-64, msys2) TESTS 38 249 7065600
349376818 ifte_ M Nov. 17, 2025, 5:25 a.m. OK C++23 (GCC 14-64, msys2) TESTS 38 249 13209600
349200811 BaarishBoy M Nov. 16, 2025, 3:45 a.m. OK C++23 (GCC 14-64, msys2) TESTS 38 249 14643200
349233178 smrydd M Nov. 16, 2025, 9:17 a.m. OK C++23 (GCC 14-64, msys2) TESTS 38 249 17715200
349199303 1435730 M Nov. 16, 2025, 3:29 a.m. OK GNU C11 TESTS 38 233 11468800
349197332 alegrarsio_2005 M Nov. 16, 2025, 3:04 a.m. OK Java 21 TESTS 38 327 7782400
349209556 SumitXorY M Nov. 16, 2025, 5:35 a.m. OK Java 21 TESTS 38 608 41472000
349201873 manasamesala01 M Nov. 16, 2025, 3:56 a.m. OK Java 21 TESTS 38 656 40448000
349200995 klu2300031943 bsurajpatra srikrishna_17 M Nov. 16, 2025, 3:47 a.m. OK Java 21 TESTS 38 734 38092800
349195084 1091857051 M Nov. 16, 2025, 2:34 a.m. OK Java 21 TESTS 38 812 42700800
349195293 oleny2209 chillingguy ThirVo M Nov. 16, 2025, 2:36 a.m. OK Java 21 TESTS 38 874 33996800
349202241 jayesh.muley M Nov. 16, 2025, 4 a.m. OK Java 21 TESTS 38 937 35328000
349209858 Ayush_Raj_2027 M Nov. 16, 2025, 5:38 a.m. OK Java 21 TESTS 38 952 33587200
349204021 Sathvika_Aluri M Nov. 16, 2025, 4:23 a.m. OK Java 8 TESTS 38 671 34099200
349204890 VSS103072_ChMSaad M Nov. 16, 2025, 4:35 a.m. OK PyPy 3-64 TESTS 38 483 37580800
349206103 imaiwluv M Nov. 16, 2025, 4:53 a.m. OK PyPy 3-64 TESTS 38 483 65433600
349198102 Jaiderbr M Nov. 16, 2025, 3:14 a.m. OK PyPy 3-64 TESTS 38 531 37068800
349198663 ALPHAwule M Nov. 16, 2025, 3:21 a.m. OK PyPy 3-64 TESTS 38 561 79667200
349195428 Sheikah M Nov. 16, 2025, 2:38 a.m. OK PyPy 3-64 TESTS 38 577 42700800
349218873 Little_Sheep_Yawn M Nov. 16, 2025, 7:02 a.m. OK PyPy 3-64 TESTS 38 577 47513600
349192492 reirugan Hori LMeyling M Nov. 16, 2025, 1:59 a.m. OK PyPy 3-64 TESTS 38 592 43008000
349208244 sukanyapirangi18 M Nov. 16, 2025, 5:20 a.m. OK PyPy 3-64 TESTS 38 593 44646400
349344119 IcyGirl M Nov. 16, 2025, 7:54 p.m. OK PyPy 3-64 TESTS 38 609 64204800
349344503 NatiYoni M Nov. 16, 2025, 7:59 p.m. OK PyPy 3-64 TESTS 38 609 70553600
349209027 sourabh_2636 M Nov. 16, 2025, 5:29 a.m. OK Python 3 TESTS 38 593 100044800
349208585 SkyHighDisha M Nov. 16, 2025, 5:24 a.m. OK Python 3 TESTS 38 608 67993600
349206322 kartikshukla1707 abhinav_26104 rajarshidattapy M Nov. 16, 2025, 4:56 a.m. OK Python 3 TESTS 38 640 68300800
349202376 Freeyouminds M Nov. 16, 2025, 4:02 a.m. OK Python 3 TESTS 38 640 103014400
349234352 gauriphatate00 M Nov. 16, 2025, 9:29 a.m. OK Python 3 TESTS 38 655 67379200
349259723 Loveforever M Nov. 16, 2025, 12:53 p.m. OK Python 3 TESTS 38 671 101376000
349194957 Rakkaun M Nov. 16, 2025, 2:32 a.m. OK Python 3 TESTS 38 687 102502400
349203299 dkyadav020806 devparth_7 imhariom25 M Nov. 16, 2025, 4:13 a.m. OK Python 3 TESTS 38 718 56012800
349216771 huseynovvusal M Nov. 16, 2025, 6:43 a.m. OK Python 3 TESTS 38 858 82124800
349193580 aryan_7_sune M Nov. 16, 2025, 2:13 a.m. OK Python 3 TESTS 38 858 103731200

remove filters

Back to search problems