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 |
---|---|---|---|---|---|---|
1648 | Codeforces Round 775 (Div. 1, based on Moscow Open Olympiad in Informatics) | FINISHED | False | 8100 | 90705863 | March 6, 2022, 9:55 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3027 ) | C | Tyler and Strings | PROGRAMMING | combinatorics data structures implementation strings |
B"While looking at the kitchen fridge, the little boy Tyler noticed magnets with symbols, that can be aligned into a string s . Tyler likes strings, and especially those that are lexicographically smaller than another string, t . After playing with magnets on the fridge, he is wondering, how many distinct strings can be composed out of letters of string s by rearranging them, so that the resulting string is lexicographically smaller than the string t ? Tyler is too young, so he can't answer this question. The alphabet Tyler uses is very large, so for your convenience he has already replaced the same letters in s and t to the same integers, keeping that different letters have been replaced to different integers. We call a string x lexicographically smaller than a string y if one of the followings conditions is fulfilled: Because the answer can be too large, print it modulo 998 ,244 ,353 . The first line contains two integers n and m ( 1 <= n, m <= 200 ,000 ) -- the lengths of strings s and t respectively. The second line contains n integers s_1, s_2, s_3, ldots, s_n ( 1 <= s_i <= 200 ,000 ) -- letters of the string s . The third line contains m integers t_1, t_2, t_3, ldots, t_m ( 1 <= t_i <= 200 ,000 ) -- letters of the string t . Print a single number -- the number of strings lexicographically smaller than t that can be obtained by rearranging the letters in s , modulo 998 ,244 ,353 . In the first example, the strings we are interested in are [1 , 2 , 2] and [2 , 1 , 2] . The string [2 , 2 , 1] is lexicographically larger than the string [2 , 1 , 2 , 1] , so we don't count it. In the second example, all strings count except [4 , 3 , 2 , 1] , so the answer is 4! - 1 = 23 . In the third example, only the string [1 , 1 , 1 , 2] counts. "... |
Codeforces Round #775 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
148572160 | ZhangCW_QwQ | C | March 6, 2022, 10:44 a.m. | OK | GNU C++14 | TESTS | 65 | 61 | 6144000 | ||
148597918 | TanKuku | C | March 6, 2022, 11:58 a.m. | OK | GNU C++14 | TESTS | 65 | 109 | 19660800 | ||
148587616 | yqj_1234 | C | March 6, 2022, 11:27 a.m. | OK | GNU C++14 | TESTS | 65 | 109 | 56217600 | ||
148573702 | lemondinosaur | C | March 6, 2022, 10:48 a.m. | OK | GNU C++14 | TESTS | 65 | 124 | 3993600 | ||
148632529 | Shirost | C | March 6, 2022, 5:33 p.m. | OK | GNU C++14 | TESTS | 66 | 124 | 3993600 | ||
148573715 | F1aMiR3 | C | March 6, 2022, 10:48 a.m. | OK | GNU C++14 | TESTS | 65 | 124 | 4812800 | ||
148586107 | XueYJ | C | March 6, 2022, 11:22 a.m. | OK | GNU C++14 | TESTS | 65 | 124 | 4812800 | ||
148554113 | djq_cpp | C | March 6, 2022, 10:12 a.m. | OK | GNU C++14 | TESTS | 65 | 124 | 5632000 | ||
148560181 | Eric_hooo | C | March 6, 2022, 10:21 a.m. | OK | GNU C++14 | TESTS | 65 | 124 | 6451200 | ||
148577472 | Aokana | C | March 6, 2022, 10:57 a.m. | OK | GNU C++14 | TESTS | 65 | 139 | 3993600 | ||
148570697 | RiCHEPCPR | C | March 6, 2022, 10:41 a.m. | OK | GNU C++17 | TESTS | 65 | 93 | 30412800 | ||
148631062 | t4m0fey | C | March 6, 2022, 5:13 p.m. | OK | GNU C++17 | TESTS | 66 | 124 | 3993600 | ||
148571726 | FrenkiedeJong21 | C | March 6, 2022, 10:43 a.m. | OK | GNU C++17 | TESTS | 65 | 124 | 4812800 | ||
148578081 | hotwords | C | March 6, 2022, 10:59 a.m. | OK | GNU C++17 | TESTS | 65 | 124 | 5632000 | ||
148582885 | maomao90 | C | March 6, 2022, 11:12 a.m. | OK | GNU C++17 | TESTS | 65 | 124 | 6451200 | ||
148582904 | ZZTC2000731 | C | March 6, 2022, 11:12 a.m. | OK | GNU C++17 | TESTS | 65 | 124 | 18124800 | ||
148580565 | 123hei | C | March 6, 2022, 11:06 a.m. | OK | GNU C++17 | TESTS | 65 | 139 | 3174400 | ||
148594762 | DFS_in_Life | C | March 6, 2022, 11:49 a.m. | OK | GNU C++17 | TESTS | 65 | 140 | 3174400 | ||
148635768 | MAqilH | C | March 6, 2022, 6:16 p.m. | OK | GNU C++17 | TESTS | 66 | 140 | 3993600 | ||
148635837 | MohammadAghil | C | March 6, 2022, 6:17 p.m. | OK | GNU C++17 | TESTS | 66 | 140 | 3993600 | ||
148585029 | wcdr | C | March 6, 2022, 11:19 a.m. | OK | GNU C++17 (64) | TESTS | 65 | 62 | 4198400 | ||
148619494 | cuiaoxiang | C | March 6, 2022, 2:54 p.m. | OK | GNU C++17 (64) | TESTS | 65 | 62 | 5120000 | ||
148571917 | liouzhou_101 | C | March 6, 2022, 10:44 a.m. | OK | GNU C++17 (64) | TESTS | 65 | 62 | 10956800 | ||
148606240 | monitor_st | C | March 6, 2022, 1:01 p.m. | OK | GNU C++17 (64) | TESTS | 65 | 62 | 23654400 | ||
148569859 | RyoPham | C | March 6, 2022, 10:39 a.m. | OK | GNU C++17 (64) | TESTS | 65 | 77 | 3993600 | ||
148609163 | Lawali | C | March 6, 2022, 1:21 p.m. | OK | GNU C++17 (64) | TESTS | 65 | 78 | 4812800 | ||
148562513 | dfcmd | C | March 6, 2022, 10:25 a.m. | OK | GNU C++17 (64) | TESTS | 65 | 78 | 4812800 | ||
148567086 | Toxel | C | March 6, 2022, 10:33 a.m. | OK | GNU C++17 (64) | TESTS | 65 | 78 | 5632000 | ||
148566960 | natsugiri | C | March 6, 2022, 10:33 a.m. | OK | GNU C++17 (64) | TESTS | 65 | 78 | 5632000 | ||
148557222 | Arraiter | C | March 6, 2022, 10:16 a.m. | OK | GNU C++17 (64) | TESTS | 65 | 78 | 8396800 | ||
148578093 | ZigZagK | C | March 6, 2022, 10:59 a.m. | OK | GNU C++20 (64) | TESTS | 65 | 31 | 3993600 | ||
148588034 | Alphagocc | C | March 6, 2022, 11:28 a.m. | OK | GNU C++20 (64) | TESTS | 65 | 31 | 8601600 | ||
148631666 | Linkus | C | March 6, 2022, 5:22 p.m. | OK | GNU C++20 (64) | TESTS | 66 | 46 | 7270400 | ||
148562805 | dl720125 | C | March 6, 2022, 10:25 a.m. | OK | GNU C++20 (64) | TESTS | 65 | 62 | 4812800 | ||
148658041 | ETK. | C | March 7, 2022, 3:40 a.m. | OK | GNU C++20 (64) | TESTS | 66 | 62 | 4812800 | ||
148575257 | maxplus | C | March 6, 2022, 10:52 a.m. | OK | GNU C++20 (64) | TESTS | 65 | 62 | 4812800 | ||
148563844 | maspy | C | March 6, 2022, 10:27 a.m. | OK | GNU C++20 (64) | TESTS | 65 | 62 | 11468800 | ||
148644790 | Boredom | C | March 6, 2022, 8:41 p.m. | OK | GNU C++20 (64) | TESTS | 66 | 77 | 4812800 | ||
148606896 | SSerxhs | C | March 6, 2022, 1:05 p.m. | OK | GNU C++20 (64) | TESTS | 65 | 77 | 6451200 | ||
148558432 | Elegia | C | March 6, 2022, 10:18 a.m. | OK | GNU C++20 (64) | TESTS | 65 | 78 | 3993600 | ||
148573734 | mmaxio | C | March 6, 2022, 10:48 a.m. | OK | Java 11 | TESTS | 65 | 265 | 0 | ||
148565744 | uwi | C | March 6, 2022, 10:31 a.m. | OK | Java 11 | TESTS | 65 | 280 | 0 | ||
148586566 | YahiaSherif | C | March 6, 2022, 11:23 a.m. | OK | Java 11 | TESTS | 65 | 342 | 10137600 | ||
148576427 | Cepera | C | March 6, 2022, 10:55 a.m. | OK | Java 11 | TESTS | 65 | 561 | 4812800 | ||
148605950 | procrastinate7 | C | March 6, 2022, 1 p.m. | OK | Java 11 | TESTS | 65 | 826 | 52736000 | ||
148582572 | Hakiobo | C | March 6, 2022, 11:12 a.m. | OK | Kotlin 1.4 | TESTS | 65 | 514 | 0 | ||
148607806 | Sparky_Master_WCH1226 | C | March 6, 2022, 1:11 p.m. | OK | Kotlin 1.4 | TESTS | 65 | 701 | 0 | ||
148608578 | arvindf232 | C | March 6, 2022, 1:16 p.m. | OK | Kotlin 1.4 | TESTS | 65 | 701 | 0 | ||
148589857 | machine_solution | C | March 6, 2022, 11:34 a.m. | OK | MS C++ 2017 | TESTS | 65 | 826 | 16179200 | ||
148584537 | mban259 | C | March 6, 2022, 11:17 a.m. | OK | .NET Core C# | TESTS | 65 | 295 | 39116800 | ||
148605737 | toam | C | March 6, 2022, 12:59 p.m. | OK | PyPy 3 | TESTS | 65 | 998 | 75468800 | ||
148638494 | eepsilon | C | March 6, 2022, 6:54 p.m. | OK | PyPy 3 | TESTS | 66 | 1138 | 53555200 | ||
148576383 | lowking | C | March 6, 2022, 10:55 a.m. | OK | PyPy 3 | TESTS | 65 | 1918 | 99328000 | ||
148574696 | tamato | C | March 6, 2022, 10:50 a.m. | OK | PyPy 3-64 | TESTS | 65 | 514 | 38502400 | ||
148588384 | r57shell | C | March 6, 2022, 11:29 a.m. | OK | PyPy 3-64 | TESTS | 65 | 546 | 39526400 | ||
148584534 | suncup224 | C | March 6, 2022, 11:17 a.m. | OK | PyPy 3-64 | TESTS | 65 | 935 | 46592000 | ||
148570979 | googol_S0 | C | March 6, 2022, 10:42 a.m. | OK | PyPy 3-64 | TESTS | 65 | 967 | 72704000 | ||
148638555 | eepsilon | C | March 6, 2022, 6:55 p.m. | OK | PyPy 3-64 | TESTS | 66 | 1216 | 45260800 | ||
148615536 | sansen | C | March 6, 2022, 2:14 p.m. | OK | Rust 2021 | TESTS | 65 | 62 | 19353600 | ||
148571016 | Egor | C | March 6, 2022, 10:42 a.m. | OK | Rust 2021 | TESTS | 65 | 233 | 14438400 |
Back to search problems