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
( 1181 ) K Time Display Stickers PROGRAMMING binary search

You have a collection of (n) digit stickers, represented by a string (S) of length (n). Each character of (S) is a digit 0 through 9 , representing one sticker of that digit. You want to create time displays using these stickers. Each time display shows a time in the format HH:MM , where: HH is a two-digit hour between (00) and (11) (inclusive), and MM is a two-digit minute between (00) and (59) (inclusive). In other words, each time display requires exactly four stickers: two for the hours and two for the minutes. Each sticker can only be used for at most one time display. What is the maximum number of time displays you can create? The first line of input contains one integer (t) ((1 \le t \le 10\,000)) representing the number of test cases. After that, (t) test cases follow. Each of them is presented as follows. The first line of each test case contains an integer (n) ((1 \le n \le 10^6)). The second line contains a string (S) of length (n), consisting only of digits 0 – 9 . The sum of (n) across all test cases in one input file does not exceed (10^6). For each test case, output the maximum number of time displays you can create. Explanation for the sample input/output #1 For the first test case, you can create one time display 10:59 . It can be shown that you cannot create two displays for a given collection of stickers. For the second test case, you can create two time displays: 10:59 and 04:27 . For the third test case, you can create two time displays: 11:19 and 11:19 . For the fourth test case, you cannot create any time displays.

Tutorials

Tutorial (PDF)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
365801479 shabobala K March 8, 2026, 4:46 a.m. OK C# 10 TESTS 23 93 3686400
365795801 youjiang66 K March 8, 2026, 3:06 a.m. OK C++17 (GCC 7-32) TESTS 23 31 102400
365851042 hoangvu5 K March 8, 2026, 1:21 p.m. OK C++17 (GCC 7-32) TESTS 23 46 0
365940942 ShubhamKP K March 9, 2026, 5:30 a.m. OK C++17 (GCC 7-32) TESTS 23 46 102400
365834024 kavyanshkrishan K March 8, 2026, 10:31 a.m. OK C++17 (GCC 7-32) TESTS 23 46 102400
365833828 kavyanshkrishan K March 8, 2026, 10:29 a.m. OK C++17 (GCC 7-32) TESTS 23 46 102400
365813434 dynamo666666 K March 8, 2026, 7 a.m. OK C++17 (GCC 7-32) TESTS 23 46 102400
365811144 ngominhduc K March 8, 2026, 6:39 a.m. OK C++17 (GCC 7-32) TESTS 23 46 102400
365806697 SongJiaC K March 8, 2026, 5:51 a.m. OK C++17 (GCC 7-32) TESTS 23 46 102400
365805722 K.An K March 8, 2026, 5:39 a.m. OK C++17 (GCC 7-32) TESTS 23 46 102400
365803270 hiteshjakhar__29 K March 8, 2026, 5:11 a.m. OK C++17 (GCC 7-32) TESTS 23 46 102400
365796382 scarletland K March 8, 2026, 3:16 a.m. OK C++20 (GCC 13-64) TESTS 23 31 0
365791947 OrderedHot K March 8, 2026, 1:57 a.m. OK C++20 (GCC 13-64) TESTS 23 31 0
365835456 flashmt K March 8, 2026, 10:45 a.m. OK C++20 (GCC 13-64) TESTS 23 31 102400
365818629 pyqjw1 K March 8, 2026, 7:55 a.m. OK C++20 (GCC 13-64) TESTS 23 31 102400
365815657 shera002 K March 8, 2026, 7:24 a.m. OK C++20 (GCC 13-64) TESTS 23 31 102400
365798522 abhijeetballabh_23 Manas_DixiT K March 8, 2026, 3:54 a.m. OK C++20 (GCC 13-64) TESTS 23 31 102400
365847671 AiHAn K March 8, 2026, 12:49 p.m. OK C++20 (GCC 13-64) TESTS 23 46 0
365827165 SanjarAlgo K March 8, 2026, 9:23 a.m. OK C++20 (GCC 13-64) TESTS 23 46 0
365802087 FredyNC23 K March 8, 2026, 4:56 a.m. OK C++20 (GCC 13-64) TESTS 23 46 0
365797399 hoangletuan K March 8, 2026, 3:34 a.m. OK C++20 (GCC 13-64) TESTS 23 46 0
365928617 Dcukducker K March 9, 2026, 12:51 a.m. OK C++23 (GCC 14-64, msys2) TESTS 23 31 0
365910744 milind0110 K March 8, 2026, 7:19 p.m. OK C++23 (GCC 14-64, msys2) TESTS 23 31 0
365814062 vishwatej_shende K March 8, 2026, 7:07 a.m. OK C++23 (GCC 14-64, msys2) TESTS 23 31 0
365938322 hhzhexuejia K March 9, 2026, 4:46 a.m. OK C++23 (GCC 14-64, msys2) TESTS 23 31 102400
365845109 qip K March 8, 2026, 12:24 p.m. OK C++23 (GCC 14-64, msys2) TESTS 23 31 102400
365831457 makeit422 K March 8, 2026, 10:05 a.m. OK C++23 (GCC 14-64, msys2) TESTS 23 31 102400
365819386 i_am_satvik K March 8, 2026, 8:03 a.m. OK C++23 (GCC 14-64, msys2) TESTS 23 31 102400
365817163 theub K March 8, 2026, 7:39 a.m. OK C++23 (GCC 14-64, msys2) TESTS 23 31 102400
365795688 lzyrapx K March 8, 2026, 3:04 a.m. OK C++23 (GCC 14-64, msys2) TESTS 23 31 102400
365794919 VishnuRao K March 8, 2026, 2:51 a.m. OK C++23 (GCC 14-64, msys2) TESTS 23 31 102400
365850471 1435730 K March 8, 2026, 1:16 p.m. OK GNU C11 TESTS 23 46 1024000
365803905 cse.scholarx K March 8, 2026, 5:19 a.m. OK GNU C11 TESTS 23 62 1126400
365817074 hackersheela K March 8, 2026, 7:39 a.m. OK Java 21 TESTS 23 250 614400
365799224 deshaboinaabhishekyadav K March 8, 2026, 4:06 a.m. OK Java 21 TESTS 23 265 512000
365807020 rithishreddy17_ ysharsha1 vineetiwari K March 8, 2026, 5:54 a.m. OK Java 21 TESTS 23 265 819200
365817132 hackersheela K March 8, 2026, 7:39 a.m. OK Java 21 TESTS 23 281 819200
365796855 CodingLagg pranavjh krishsaini_777 K March 8, 2026, 3:24 a.m. OK Java 21 TESTS 23 296 2252800
365796179 anwaraftab K March 8, 2026, 3:13 a.m. OK Java 21 TESTS 23 703 921600
365793322 hk3382 K March 8, 2026, 2:24 a.m. OK Java 8 TESTS 23 109 0
365795600 Dhanush.x revanth66 K March 8, 2026, 3:02 a.m. OK PyPy 3-64 TESTS 23 78 7475200
365803771 Sacred_Conqurer K March 8, 2026, 5:17 a.m. OK PyPy 3-64 TESTS 23 78 268288000
365792542 EricZzzzz GarrisonQ -nameless- K March 8, 2026, 2:09 a.m. OK PyPy 3-64 TESTS 23 109 137318400
365792879 SnowLucario_Z Ryazimn cran K March 8, 2026, 2:15 a.m. OK PyPy 3-64 TESTS 23 125 6553600
365797127 Chayanine K March 8, 2026, 3:28 a.m. OK PyPy 3-64 TESTS 23 125 6963200
365792874 mikelou K March 8, 2026, 2:15 a.m. OK PyPy 3-64 TESTS 23 125 8499200
365819854 IcyGirl K March 8, 2026, 8:08 a.m. OK PyPy 3-64 TESTS 23 125 8704000
365792701 TomGetsu leduchuy K March 8, 2026, 2:12 a.m. OK PyPy 3-64 TESTS 23 140 6860800
365908912 golomb K March 8, 2026, 6:56 p.m. OK PyPy 3-64 TESTS 23 140 8396800
365801929 dyppp K March 8, 2026, 4:53 a.m. OK PyPy 3-64 TESTS 23 156 24473600
365811510 Hridoy1013 K March 8, 2026, 6:42 a.m. OK Python 3 TESTS 23 109 3072000
365792120 hellovir K March 8, 2026, 2:01 a.m. OK Python 3 TESTS 23 171 3174400
365793403 hj2705 K March 8, 2026, 2:25 a.m. OK Python 3 TESTS 23 203 3174400
365793410 singchu3331906 K March 8, 2026, 2:25 a.m. OK Python 3 TESTS 23 359 3174400
365792500 akhileshwar_241 K March 8, 2026, 2:08 a.m. OK Python 3 TESTS 23 1062 2457600
365792722 sansen K March 8, 2026, 2:12 a.m. OK Rust 2021 TESTS 23 31 307200
365858208 SnowballSH K March 8, 2026, 2:09 p.m. OK Rust 2024 TESTS 23 46 17305600
365856138 K March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856080 K March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856022 K March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365856006 K March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365855982 K March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365855975 K March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365855936 K March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365855930 K March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365855916 K March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0
365855859 K March 8, 2026, 1:52 p.m. OK Unknown TESTS 0 0 0

remove filters

Back to search problems