Educational Codeforces Round 178 (Rated for Div. 2)

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
2104 Educational Codeforces Round 178 (Rated for Div. 2) FINISHED False 7200 30554723 April 28, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 711 ) F Numbers and Strings PROGRAMMING brute force dfs and similar dp implementation math

For each integer (x) from (1) to (n), we will form the string (S(x)) according to the following rules: compute ((x+1)); write (x) and (x+1) next to each other in the decimal system without separators and leading zeros; in the resulting string, sort all digits in non-decreasing order. For example, the string (S(139)) is 011349 (before sorting the digits, it is 139140 ). The string (S(99)) is 00199 . Your task is to count the number of distinct strings among (S(1), S(2), \dots, S(n)). The first line contains one integer (t) ((1 \le t \le 10^4)) — the number of test cases. Each test case consists of one line containing a single integer (n) ((1 \le n \le 10^{9} - 2)). For each test case, output a single integer — the number of distinct strings among (S(1), S(2), \dots, S(n)).

Tutorials

Educational Codeforces Round 178 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
317686505 ian_HLX F April 29, 2025, 1:57 a.m. OK C++17 (GCC 7-32) TESTS 9 78 102400
317686587 ian_HLX F April 29, 2025, 1:59 a.m. OK C++17 (GCC 7-32) TESTS 9 92 2150400
317685837 jiangxinyang2012 F April 29, 2025, 1:39 a.m. OK C++17 (GCC 7-32) TESTS 9 140 0
317643413 Um_nik F April 28, 2025, 4:13 p.m. OK C++17 (GCC 7-32) TESTS 9 280 4096000
317679595 Shtn F April 28, 2025, 10:39 p.m. OK C++17 (GCC 7-32) TESTS 9 374 2662400
317684808 AiPd F April 29, 2025, 1:11 a.m. OK C++17 (GCC 7-32) TESTS 9 374 20172800
317662549 Xerxes F April 28, 2025, 6:11 p.m. OK C++17 (GCC 7-32) TESTS 9 405 20172800
317648473 openaitesting F April 28, 2025, 4:26 p.m. OK C++17 (GCC 7-32) TESTS 9 421 22835200
317648113 timer2023 F April 28, 2025, 4:25 p.m. OK C++17 (GCC 7-32) TESTS 9 421 200499200
317649887 akshitmittal F April 28, 2025, 4:29 p.m. OK C++17 (GCC 7-32) TESTS 9 468 31846400
317678917 Ormlis F April 28, 2025, 10:19 p.m. OK C++20 (GCC 13-64) TESTS 9 46 102400
317644858 ylzxxx7 F April 28, 2025, 4:17 p.m. OK C++20 (GCC 13-64) TESTS 9 77 80179200
317655622 StarSilk F April 28, 2025, 5:12 p.m. OK C++20 (GCC 13-64) TESTS 9 109 102400
317650198 EnofTaiPeople F April 28, 2025, 4:30 p.m. OK C++20 (GCC 13-64) TESTS 9 109 88985600
317683240 max0810 F April 29, 2025, 12:26 a.m. OK C++20 (GCC 13-64) TESTS 9 140 2150400
317649360 furry F April 28, 2025, 4:28 p.m. OK C++20 (GCC 13-64) TESTS 9 171 3174400
317642614 moiaaaaaaa F April 28, 2025, 4:12 p.m. OK C++20 (GCC 13-64) TESTS 9 171 13824000
317693338 oldEight F April 29, 2025, 4:23 a.m. OK C++20 (GCC 13-64) TESTS 9 265 24166400
317642251 liympanda F April 28, 2025, 4:11 p.m. OK C++20 (GCC 13-64) TESTS 9 280 32972800
317657516 noya2 F April 28, 2025, 5:26 p.m. OK C++20 (GCC 13-64) TESTS 9 281 3788800
317695357 yoki F April 29, 2025, 5:01 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 102400
317691829 _daryll_ F April 29, 2025, 3:53 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 62 3788800
317691893 _daryll_ F April 29, 2025, 3:54 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 62 3891200
317698033 less-than-green F April 29, 2025, 5:37 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 77 3788800
317697870 less-than-green F April 29, 2025, 5:35 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 77 3788800
317691943 _daryll_ F April 29, 2025, 3:56 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 77 3788800
317662865 krit3379 F April 28, 2025, 6:14 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 77 13721600
317672123 demonzzq F April 28, 2025, 8:02 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 109 102400
317673782 less-than-green F April 28, 2025, 8:28 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 186 25702400
317673975 less-than-green F April 28, 2025, 8:31 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 187 25702400
317656486 rainboy F April 28, 2025, 5:18 p.m. OK GNU C11 TESTS 9 155 102400
317651368 number_one_sakib_khan F April 28, 2025, 4:33 p.m. OK Java 21 TESTS 9 1983 109772800
317651438 omdeshmukh1906 F April 28, 2025, 4:33 p.m. OK Java 8 TESTS 9 1108 65024000
317645826 Akiii_2023 F April 28, 2025, 4:19 p.m. OK PyPy 3 TESTS 9 1608 71065600
317651862 _WD_ F April 28, 2025, 4:33 p.m. OK PyPy 3-64 TESTS 9 1280 129536000
317642783 ow3nL F April 28, 2025, 4:12 p.m. OK PyPy 3-64 TESTS 9 1358 110694400
317644290 ckuhn222 F April 28, 2025, 4:16 p.m. OK PyPy 3-64 TESTS 9 1655 125542400
317695258 ValeriyShiyan F April 29, 2025, 4:59 a.m. OK PyPy 3-64 TESTS 9 1889 335462400
317642791 rebik9 F April 28, 2025, 4:12 p.m. OK Python 3 TESTS 9 1640 137113600

remove filters

Back to search problems