2024 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
2041 2024 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) FINISHED False 18000 44060084 Nov. 24, 2024, 7:05 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 506 ) F Segmentation Folds PROGRAMMING brute force dfs and similar number theory

Peter loves folding segments. There is a segment on a number line occupying the interval (\ell, r). Since it is the prime time for folding the segments, Peter decides to fold the segment carefully. In each step, he chooses one of the two following operations whenever possible: Operation (\tt{LTR}): he folds the segment from left to right, where (\ell) coincides with a point (x) ((\ell < x \le r)) such that (\ell+x) is a prime number (^{\text{∗}}). When Peter chooses this operation, he always chooses the largest possible value (x). Note that the segment occupies the interval (\frac{1}{2}(\ell+x), r) afterwards. Operation (\tt{RTL}): he folds the segment from right to left, where (r) coincides with a point (x) ((\ell \le x < r)) such that (r+x) is a prime number . When Peter chooses this operation, he always chooses the smallest possible value (x). Note that the segment occupies the interval (\ell, \frac{1}{2}(r+x)) afterwards. A folding sequence refers to a sequence of operations specified above. Peter wants to fold the segment several times, resulting in the shortest possible interval whose length that cannot be further reduced. The length of an interval (\ell, r) is defined naturally to be (r-\ell). Let's consider the following example. Suppose that we are folding a segment initially occupying the interval (1, 30). There are three folding sequences that lead to the shortest possible resulting interval, as shown in the following figure. Please help Peter determine the number of folding sequences such that the resulting interval has a shortest possible length. Output the number modulo (998244353). (^{\text{∗}})Recall that an integer (p>1) is a prime number if there do not exist integers (a, b>1) such that (p=ab). The first line contains an integer (t), denoting the number of test cases. In each of the following (t) lines, there are two integers

Tutorials

Problem Analysis and Hints (PDF)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
293079694 xcyyyyyy lhzawa 11d10xy F Nov. 24, 2024, 10:56 a.m. OK C++17 (GCC 7-32) TESTS 6 77 9830400
293075469 Siranticorz SlipM systemStart F Nov. 24, 2024, 10:25 a.m. OK C++17 (GCC 7-32) TESTS 6 77 29286400
293070235 PEIMUDA GroupMatrix F Nov. 24, 2024, 9:46 a.m. OK C++17 (GCC 7-32) TESTS 6 109 5427200
293085483 RUSH_D_CAT limbo.null NecroSean38 F Nov. 24, 2024, 11:35 a.m. OK C++17 (GCC 7-32) TESTS 6 171 0
293052059 kradcigam Xun_Xiaoyao no_dream F Nov. 24, 2024, 8:32 a.m. OK C++17 (GCC 7-32) TESTS 6 186 18124800
293071006 lanhf SliferSkyd rainbowbunny F Nov. 24, 2024, 9:51 a.m. OK C++17 (GCC 7-32) TESTS 6 187 25600000
293071866 Fish_and_Chips JoanhLan WRKRW F Nov. 24, 2024, 9:58 a.m. OK C++17 (GCC 7-32) TESTS 6 218 22528000
293081924 Yaimsea DanWin wlkx F Nov. 24, 2024, 11:12 a.m. OK C++17 (GCC 7-32) TESTS 6 233 4096000
293057227 Huy_inIT lamduybao03 canhnam357 F Nov. 24, 2024, 9:06 a.m. OK C++17 (GCC 7-32) TESTS 6 234 5734400
293086579 youdu666 zhutianrui Gold14526 F Nov. 24, 2024, 11:43 a.m. OK C++17 (GCC 7-32) TESTS 6 281 11878400
293134619 yallavamsipavan F Nov. 24, 2024, 5:55 p.m. OK C++20 (GCC 13-64) TESTS 6 77 1945600
293077003 min_inf KnownError_ LuoTianyi_Unofficial F Nov. 24, 2024, 10:37 a.m. OK C++20 (GCC 13-64) TESTS 6 78 1945600
293084845 K_tian qkm66666 Tobo F Nov. 24, 2024, 11:31 a.m. OK C++20 (GCC 13-64) TESTS 6 93 14336000
293122089 Swishy123 F Nov. 24, 2024, 4:09 p.m. OK C++20 (GCC 13-64) TESTS 6 108 4096000
293088584 Eason9002 wtc yanzihe F Nov. 24, 2024, 11:56 a.m. OK C++20 (GCC 13-64) TESTS 6 108 4096000
293072232 Svemit lsxhyyds KingPowers F Nov. 24, 2024, 10:01 a.m. OK C++20 (GCC 13-64) TESTS 6 108 180428800
293073813 Nt_Yester KinNa LuckyFool F Nov. 24, 2024, 10:13 a.m. OK C++20 (GCC 13-64) TESTS 6 109 28160000
293060587 yuanruiqi EasonTAO F Nov. 24, 2024, 9:28 a.m. OK C++20 (GCC 13-64) TESTS 6 171 21504000
293059909 Hanghang007 H_W_Y Meatherm F Nov. 24, 2024, 9:23 a.m. OK C++20 (GCC 13-64) TESTS 6 171 28057600
293082204 JoeyJ liyelin KevinLikesCoding F Nov. 24, 2024, 11:13 a.m. OK C++20 (GCC 13-64) TESTS 6 203 204800
293137444 qlwpc F Nov. 24, 2024, 6:19 p.m. OK C++23 (GCC 14-64, msys2) TESTS 6 77 60108800
293072443 magnified HollwoQ_Pelw TrungNotChung F Nov. 24, 2024, 10:02 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 78 3174400
293055683 cmk666 F Nov. 24, 2024, 8:57 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 93 10752000
293054089 SSerxhs F Nov. 24, 2024, 8:46 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 124 27443200
293073462 Alpha_Q Anachor nfssdq F Nov. 24, 2024, 10:10 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 140 35942400
293081055 limbo16 Igor_Parfenov Vectors_Master F Nov. 24, 2024, 11:06 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 171 2252800
293056238 penguinman yuto1115 Wailydest F Nov. 24, 2024, 9:01 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 171 21504000
293078555 artem3605 RomkaRS F Nov. 24, 2024, 10:48 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 202 102400
293159712 AnsonWong F Nov. 25, 2024, 12:16 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 202 2867200
293073697 foreverlasting F Nov. 24, 2024, 10:12 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 202 7168000
293018860 F Nov. 24, 2024, 1:17 a.m. OK Unknown TESTS 0 0 0
293018791 F Nov. 24, 2024, 1:17 a.m. OK Unknown TESTS 0 0 0
293018756 F Nov. 24, 2024, 1:17 a.m. OK Unknown TESTS 0 0 0
293018574 F Nov. 24, 2024, 1:17 a.m. OK Unknown TESTS 0 0 0
293018564 F Nov. 24, 2024, 1:17 a.m. OK Unknown TESTS 0 0 0
293018514 F Nov. 24, 2024, 1:17 a.m. OK Unknown TESTS 0 0 0
293018491 F Nov. 24, 2024, 1:17 a.m. OK Unknown TESTS 0 0 0
293018442 F Nov. 24, 2024, 1:17 a.m. OK Unknown TESTS 0 0 0
293018365 F Nov. 24, 2024, 1:17 a.m. OK Unknown TESTS 0 0 0
293018321 F Nov. 24, 2024, 1:17 a.m. OK Unknown TESTS 0 0 0

remove filters

Back to search problems