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
( 3824 ) F Cluster Computing System PROGRAMMING

The ICPC company plans to build a cluster computing system consisting of (n) servers. Each server has a database protocol type represented by a positive integer. Specifically, the (i)-th server has a protocol type (p_i). Initially, all servers are independent. The company wants to establish connections between servers so that, in the resulting network, every server can reach every other server (either directly or indirectly). To achieve full connectivity, you may establish several connections. Each time you establish a connection, you must choose two servers (u) and (v) ((u < v)). The cost of establishing the connection between (u) and (v) is defined as the common protocol of the databases in the range from (u) to (v), calculated as (\gcd(p_u, p_{u+1}, \ldots, p_v)) (^{\text{∗}}). Determine the minimum total cost required to fully connect all (n) servers so that every server is reachable from every other server. (^{\text{∗}})(\mathrm{gcd}) is the largest positive integer that divides every integer in that set without leaving a remainder. The first line contains a single integer (n), representing the number of servers. The second line contains (n) positive integers (p_1, p_2, \ldots, p_n), where (p_i) is the database protocol type of the (i)-th server. (2\leq n\leq 2\times 10^5) (1\leq p_i \leq 10^9) Output a single integer in a line, representing the minimum total cost required to fully connect the cluster computing system. Explanation of Example 2: The figure shows an example with protocol types (2), (4), (6), (7), (14), and (21). The costs of all possible connections are (1), (2), or (7), indicated by different widths. There is a way to connect all together with five connections of cost (1) each (displayed in red).

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
349230200 og.kostya F Nov. 16, 2025, 8:50 a.m. OK C# 10 TESTS 15 108 3788800
349230132 og.kostya F Nov. 16, 2025, 8:50 a.m. OK C# 13 TESTS 15 155 5120000
349197195 Tobo F Nov. 16, 2025, 3:02 a.m. OK C++17 (GCC 7-32) TESTS 15 77 0
349201034 nhannguyen120216 F Nov. 16, 2025, 3:47 a.m. OK C++17 (GCC 7-32) TESTS 15 77 2457600
349192861 raokc F Nov. 16, 2025, 2:04 a.m. OK C++17 (GCC 7-32) TESTS 15 77 3174400
349375973 dgs2 F Nov. 17, 2025, 5:16 a.m. OK C++17 (GCC 7-32) TESTS 17 93 102400
349197400 djsksbrbf F Nov. 16, 2025, 3:05 a.m. OK C++17 (GCC 7-32) TESTS 15 93 819200
349355127 a_marzouk F Nov. 16, 2025, 11:30 p.m. OK C++17 (GCC 7-32) TESTS 17 93 921600
349193554 SeeItAgain afeng111 padding F Nov. 16, 2025, 2:13 a.m. OK C++17 (GCC 7-32) TESTS 15 93 921600
349352460 ExtraStageLover F Nov. 16, 2025, 10:18 p.m. OK C++17 (GCC 7-32) TESTS 17 93 2457600
349209920 iloveMT F Nov. 16, 2025, 5:39 a.m. OK C++17 (GCC 7-32) TESTS 15 93 2457600
349195467 .no_Name. F Nov. 16, 2025, 2:39 a.m. OK C++17 (GCC 7-32) TESTS 15 93 2457600
349202306 Jerrasterix krishisop DSKroc F Nov. 16, 2025, 4:01 a.m. OK C++20 (GCC 13-64) TESTS 15 77 0
349200777 KatsuXD F Nov. 16, 2025, 3:45 a.m. OK C++20 (GCC 13-64) TESTS 15 77 0
349194601 TKT_YI HoyHoyCharhang F Nov. 16, 2025, 2:27 a.m. OK C++20 (GCC 13-64) TESTS 15 77 921600
349193146 1bin dong_gas djs100201 F Nov. 16, 2025, 2:08 a.m. OK C++20 (GCC 13-64) TESTS 15 77 921600
349194025 Nika533 F Nov. 16, 2025, 2:19 a.m. OK C++20 (GCC 13-64) TESTS 15 77 1024000
349193108 mshandilya Ar7e9 Krispy F Nov. 16, 2025, 2:07 a.m. OK C++20 (GCC 13-64) TESTS 15 77 1024000
349195520 lenguyenminha7ntt stepheneleven _asunaa F Nov. 16, 2025, 2:39 a.m. OK C++20 (GCC 13-64) TESTS 15 77 4812800
349223222 RamennSama F Nov. 16, 2025, 7:43 a.m. OK C++20 (GCC 13-64) TESTS 15 78 0
349207662 avner.m.lim F Nov. 16, 2025, 5:13 a.m. OK C++20 (GCC 13-64) TESTS 15 78 921600
349206594 aRBeK longafternoon F Nov. 16, 2025, 4:59 a.m. OK C++20 (GCC 13-64) TESTS 15 78 921600
349228751 asdasdqwer vishld snokes F Nov. 16, 2025, 8:38 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 77 0
349210043 EmptyHole F Nov. 16, 2025, 5:40 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 77 0
349204130 sav1209 06Derek_ Queso7 F Nov. 16, 2025, 4:25 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 77 0
349199255 LY02 F Nov. 16, 2025, 3:29 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 77 0
349198595 illbeatyou F Nov. 16, 2025, 3:20 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 77 0
349193550 duckindog F Nov. 16, 2025, 2:13 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 77 0
349192903 GioChkhaidze F Nov. 16, 2025, 2:04 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 77 0
349192899 coSai Yi_xi cmy666 F Nov. 16, 2025, 2:04 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 77 0
349215916 Personalism F Nov. 16, 2025, 6:35 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 77 1024000
349198488 bramar2 F Nov. 16, 2025, 3:18 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 77 1024000
349195618 1435730 F Nov. 16, 2025, 2:41 a.m. OK GNU C11 TESTS 15 77 2457600
349193215 1091857051 F Nov. 16, 2025, 2:08 a.m. OK Java 21 TESTS 15 343 6451200
349254805 UI-Shashank F Nov. 16, 2025, 12:12 p.m. OK Java 21 TESTS 17 686 1843200
349201351 jayesh.muley F Nov. 16, 2025, 3:51 a.m. OK Java 21 TESTS 15 968 125337600
349210262 Huzaifa_Ahmed_Bari F Nov. 16, 2025, 5:42 a.m. OK PyPy 3 TESTS 15 343 21811200
349204631 Mentholzzz F Nov. 16, 2025, 4:31 a.m. OK PyPy 3-64 TESTS 15 171 21401600
349197740 ETO_leader F Nov. 16, 2025, 3:09 a.m. OK PyPy 3-64 TESTS 15 171 27136000
349363495 VaHiX F Nov. 17, 2025, 2:29 a.m. OK PyPy 3-64 TESTS 17 171 27750400
349193598 Vijay_9848 RUTHVIK0811 abhilashreddy45 F Nov. 16, 2025, 2:13 a.m. OK PyPy 3-64 TESTS 15 171 30515200
349198655 Steampunkstar guptaprakhar_01 naveents1915 F Nov. 16, 2025, 3:21 a.m. OK PyPy 3-64 TESTS 15 187 26931200
349251706 OpKos F Nov. 16, 2025, 11:46 a.m. OK PyPy 3-64 TESTS 17 187 30003200
349296303 HumbleRobo F Nov. 16, 2025, 3:15 p.m. OK PyPy 3-64 TESTS 17 202 27136000
349197581 Jaiderbr F Nov. 16, 2025, 3:07 a.m. OK PyPy 3-64 TESTS 15 202 27136000
349237384 Hyder1102 F Nov. 16, 2025, 9:57 a.m. OK PyPy 3-64 TESTS 15 202 32358400
349193640 MinValgen RoninMello Abdo_Sleem F Nov. 16, 2025, 2:14 a.m. OK PyPy 3-64 TESTS 15 218 27033600
349206044 MallikarjunaReddyThota F Nov. 16, 2025, 4:52 a.m. OK Python 3 TESTS 15 234 26624000
349209643 anejmeldeen F Nov. 16, 2025, 5:36 a.m. OK Python 3 TESTS 15 389 27750400

remove filters

Back to search problems