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 |
---|---|---|---|---|---|---|
1748 | Codeforces Round 833 (Div. 2) | FINISHED | False | 7200 | 68916263 | Nov. 12, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 15379 ) | B | Diverse Substrings | PROGRAMMING | brute force implementation strings | 1400 |
B'A non-empty digit string is diverse if the number of occurrences of each character in it doesn 't exceed the number of distinct characters in it. For example: You are given a string s of length n , consisting of only digits 0 to 9 . Find how many of its frac{n(n+1)}{2} substrings are diverse. A string a is a substring of a string b if a can be obtained from b by deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end. Note that if the same diverse string appears in s multiple times, each occurrence should be counted independently. For example, there are two diverse substrings in "77" both equal to "7", so the answer for the string "77" is 2 . Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ) -- the length of the string s . The second line of each test case contains a string s of length n . It is guaranteed that all characters of s are digits from 0 to 9 . It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case print one integer -- the number of diverse substrings of the given string s . In the first test case, the diverse substring is "7". In the second test case, the only diverse substring is "7", which appears twice, so the answer is 2 . In the third test case, the diverse substrings are "0" ( 2 times), "01", "010", "1" ( 2 times), "10" ( 2 times), "101" and "1010". In the fourth test case, the diverse substrings are "0" ( 3 times), "01", "011", "0110", "1" ( 2 times), "10", "100", "110" and "1100". In the fifth test case, the diverse substrings are "3", "39", "399", "6", "9" ( 4 times), "96" and "996". '... |
Codeforces Round #833 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
180664531 | Psionicist | B | Nov. 12, 2022, 5:42 p.m. | OK | C# 10 | TESTS | 15 | 108 | 4198400 | 1400 | |
180665294 | cyrus_msk | B | Nov. 12, 2022, 5:50 p.m. | OK | D | TESTS | 15 | 78 | 4198400 | 1400 | |
180645932 | ssvb | B | Nov. 12, 2022, 3:57 p.m. | OK | D | TESTS | 15 | 140 | 4198400 | 1400 | |
180702948 | Miraemon | B | Nov. 13, 2022, 3:41 a.m. | OK | GNU C11 | TESTS | 18 | 46 | 102400 | 1400 | |
180660404 | mrgaolll | B | Nov. 12, 2022, 5:06 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 102400 | 1400 | |
180670682 | SP2003 | B | Nov. 12, 2022, 6:51 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 102400 | 1400 | |
180650997 | mldl | B | Nov. 12, 2022, 4:16 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 3993600 | 1400 | |
180652039 | ichi_kd | B | Nov. 12, 2022, 4:20 p.m. | OK | GNU C11 | TESTS | 15 | 62 | 409600 | 1400 | |
180657589 | QZKago_Requiem | B | Nov. 12, 2022, 4:49 p.m. | OK | GNU C11 | TESTS | 15 | 842 | 409600 | 1400 | |
180705622 | Eltongao | B | Nov. 13, 2022, 4:42 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 102400 | 1400 | |
180702291 | cryozwq | B | Nov. 13, 2022, 3:25 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 102400 | 1400 | |
180700530 | FloorX | B | Nov. 13, 2022, 2:42 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 102400 | 1400 | |
180696701 | HuskieQAQ | B | Nov. 13, 2022, 12:57 a.m. | OK | GNU C++14 | TESTS | 15 | 31 | 102400 | 1400 | |
180660381 | linruier | B | Nov. 12, 2022, 5:06 p.m. | OK | GNU C++14 | TESTS | 15 | 31 | 102400 | 1400 | |
180657715 | HarryFan | B | Nov. 12, 2022, 4:49 p.m. | OK | GNU C++14 | TESTS | 15 | 31 | 102400 | 1400 | |
180656013 | pingbai | B | Nov. 12, 2022, 4:33 p.m. | OK | GNU C++14 | TESTS | 15 | 31 | 102400 | 1400 | |
180710004 | C1942huangjiaxu | B | Nov. 13, 2022, 5:49 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 102400 | 1400 | |
180709792 | CYHei_mu | B | Nov. 13, 2022, 5:46 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 102400 | 1400 | |
180709334 | Steven__Chen | B | Nov. 13, 2022, 5:39 a.m. | OK | GNU C++14 | TESTS | 18 | 31 | 102400 | 1400 | |
180648905 | M0Ren_R33 | B | Nov. 12, 2022, 4:08 p.m. | OK | GNU C++17 | TESTS | 15 | 31 | 102400 | 1400 | |
180700640 | SLZSM | B | Nov. 13, 2022, 2:45 a.m. | OK | GNU C++17 | TESTS | 18 | 31 | 102400 | 1400 | |
180701933 | Nickjia | B | Nov. 13, 2022, 3:16 a.m. | OK | GNU C++17 | TESTS | 18 | 31 | 102400 | 1400 | |
180706615 | nabilsnigdho | B | Nov. 13, 2022, 4:59 a.m. | OK | GNU C++17 | TESTS | 18 | 31 | 102400 | 1400 | |
180691947 | aael | B | Nov. 12, 2022, 10:12 p.m. | OK | GNU C++17 | TESTS | 15 | 31 | 102400 | 1400 | |
180653371 | Vladvd | B | Nov. 12, 2022, 4:25 p.m. | OK | GNU C++17 | TESTS | 15 | 31 | 102400 | 1400 | |
180664549 | yash246 | B | Nov. 12, 2022, 5:43 p.m. | OK | GNU C++17 | TESTS | 15 | 31 | 204800 | 1400 | |
180691975 | aael | B | Nov. 12, 2022, 10:13 p.m. | OK | GNU C++17 | TESTS | 15 | 31 | 204800 | 1400 | |
180711020 | wind-1 | B | Nov. 13, 2022, 6:03 a.m. | OK | GNU C++17 | TESTS | 18 | 31 | 307200 | 1400 | |
180709755 | devanshmishra111 | B | Nov. 13, 2022, 5:46 a.m. | OK | GNU C++17 | TESTS | 18 | 31 | 307200 | 1400 | |
180697881 | HelloWorldyou | B | Nov. 13, 2022, 1:32 a.m. | OK | GNU C++17 (64) | TESTS | 16 | 31 | 102400 | 1400 | |
180688190 | enslaved | B | Nov. 12, 2022, 8:51 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 307200 | 1400 | |
180708287 | mattagar6 | B | Nov. 13, 2022, 5:24 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 31 | 307200 | 1400 | |
180705355 | Rick_GT | B | Nov. 13, 2022, 4:37 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 31 | 307200 | 1400 | |
180693743 | NomadOfNowhere | B | Nov. 12, 2022, 11:09 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 307200 | 1400 | |
180688649 | Amanmaurya_2012 | B | Nov. 12, 2022, 8:58 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 307200 | 1400 | |
180665023 | aymanriadsolh | B | Nov. 12, 2022, 5:47 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 307200 | 1400 | |
180660373 | Bullet | B | Nov. 12, 2022, 5:06 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 307200 | 1400 | |
180659640 | AQUA_FLASH | B | Nov. 12, 2022, 5:01 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 307200 | 1400 | |
180647828 | Beevo | B | Nov. 12, 2022, 4:04 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 307200 | 1400 | |
180668034 | Sveg | B | Nov. 12, 2022, 6:19 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 31 | 102400 | 1400 | |
180670516 | KienHocNgu | B | Nov. 12, 2022, 6:49 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 31 | 102400 | 1400 | |
180691854 | aael | B | Nov. 12, 2022, 10:10 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 31 | 102400 | 1400 | |
180691839 | aael | B | Nov. 12, 2022, 10:09 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 31 | 102400 | 1400 | |
180696773 | Vercingetorix | B | Nov. 13, 2022, 12:59 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 31 | 102400 | 1400 | |
180697544 | sabbirahmeds877 | B | Nov. 13, 2022, 1:23 a.m. | OK | GNU C++20 (64) | TESTS | 16 | 31 | 204800 | 1400 | |
180709544 | zero.xzp | B | Nov. 13, 2022, 5:42 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 31 | 204800 | 1400 | |
180707738 | bhavyrajdev0 | B | Nov. 13, 2022, 5:16 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 31 | 307200 | 1400 | |
180709319 | Pikachu_11 | B | Nov. 13, 2022, 5:39 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 31 | 307200 | 1400 | |
180709992 | Shofiqur | B | Nov. 13, 2022, 5:49 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 31 | 307200 | 1400 | |
180707247 | jordancurve | B | Nov. 13, 2022, 5:10 a.m. | OK | Go | TESTS | 18 | 77 | 1228800 | 1400 | |
180660712 | D05T0N | B | Nov. 12, 2022, 5:09 p.m. | OK | Go | TESTS | 15 | 421 | 35225600 | 1400 | |
180687654 | TanmayKumar44a | B | Nov. 12, 2022, 8:43 p.m. | OK | Java 11 | TESTS | 15 | 233 | 0 | 1400 | |
180680512 | sduMamutbekov | B | Nov. 12, 2022, 7:44 p.m. | OK | Java 11 | TESTS | 15 | 233 | 0 | 1400 | |
180659666 | peiyeliu | B | Nov. 12, 2022, 5:01 p.m. | OK | Java 11 | TESTS | 15 | 233 | 0 | 1400 | |
180668127 | AyushS_cg170 | B | Nov. 12, 2022, 6:20 p.m. | OK | Java 11 | TESTS | 15 | 249 | 0 | 1400 | |
180651935 | shojin_pro | B | Nov. 12, 2022, 4:19 p.m. | OK | Java 11 | TESTS | 15 | 249 | 0 | 1400 | |
180708949 | g_square | B | Nov. 13, 2022, 5:34 a.m. | OK | Java 11 | TESTS | 18 | 265 | 0 | 1400 | |
180663144 | skpandey885 | B | Nov. 12, 2022, 5:30 p.m. | OK | Java 11 | TESTS | 15 | 280 | 0 | 1400 | |
180664701 | yash_coder_1_cf | B | Nov. 12, 2022, 5:44 p.m. | OK | Java 11 | TESTS | 15 | 280 | 0 | 1400 | |
180694461 | zhur123 | B | Nov. 12, 2022, 11:32 p.m. | OK | Java 11 | TESTS | 15 | 295 | 0 | 1400 | |
180708743 | sf14t | B | Nov. 13, 2022, 5:31 a.m. | OK | Java 11 | TESTS | 18 | 296 | 0 | 1400 | |
180696402 | kkz666 | B | Nov. 13, 2022, 12:47 a.m. | OK | Java 17 | TESTS | 15 | 186 | 512000 | 1400 | |
180667056 | casenova01 | B | Nov. 12, 2022, 6:08 p.m. | OK | Java 17 | TESTS | 15 | 311 | 716800 | 1400 | |
180669717 | AdityaGupta19 | B | Nov. 12, 2022, 6:38 p.m. | OK | Java 17 | TESTS | 15 | 311 | 819200 | 1400 | |
180703101 | _ghost180 | B | Nov. 13, 2022, 3:45 a.m. | OK | Java 17 | TESTS | 18 | 311 | 1024000 | 1400 | |
180709262 | Thejas_n | B | Nov. 13, 2022, 5:38 a.m. | OK | Java 17 | TESTS | 18 | 373 | 512000 | 1400 | |
180704032 | ketangupta12 | B | Nov. 13, 2022, 4:09 a.m. | OK | Java 17 | TESTS | 18 | 374 | 716800 | 1400 | |
180653665 | Utsav82 | B | Nov. 12, 2022, 4:26 p.m. | OK | Java 17 | TESTS | 15 | 436 | 0 | 1400 | |
180709093 | MrPerson | B | Nov. 13, 2022, 5:36 a.m. | OK | Java 17 | TESTS | 18 | 451 | 819200 | 1400 | |
180654578 | ayushmanglik2003 | B | Nov. 12, 2022, 4:29 p.m. | OK | Java 17 | TESTS | 15 | 467 | 921600 | 1400 | |
180697644 | jameszhangrg | B | Nov. 13, 2022, 1:25 a.m. | OK | Java 17 | TESTS | 16 | 483 | 204800 | 1400 | |
180659847 | youtsuha | B | Nov. 12, 2022, 5:02 p.m. | OK | Java 8 | TESTS | 15 | 139 | 0 | 1400 | |
180694384 | -crazy_coder- | B | Nov. 12, 2022, 11:29 p.m. | OK | Java 8 | TESTS | 15 | 155 | 0 | 1400 | |
180659076 | swarup_312 | B | Nov. 12, 2022, 4:57 p.m. | OK | Java 8 | TESTS | 15 | 155 | 0 | 1400 | |
180677212 | sreeprasad | B | Nov. 12, 2022, 7:02 p.m. | OK | Java 8 | TESTS | 15 | 202 | 0 | 1400 | |
180648374 | vaibhav_1710 | B | Nov. 12, 2022, 4:06 p.m. | OK | Java 8 | TESTS | 15 | 217 | 0 | 1400 | |
180688523 | Cheel27 | B | Nov. 12, 2022, 8:57 p.m. | OK | Java 8 | TESTS | 15 | 218 | 0 | 1400 | |
180668423 | Ibrahim027 | B | Nov. 12, 2022, 6:23 p.m. | OK | Java 8 | TESTS | 15 | 218 | 0 | 1400 | |
180650921 | liomsv | B | Nov. 12, 2022, 4:15 p.m. | OK | Java 8 | TESTS | 15 | 218 | 0 | 1400 | |
180702705 | hemantlodha1000 | B | Nov. 13, 2022, 3:35 a.m. | OK | Java 8 | TESTS | 18 | 233 | 0 | 1400 | |
180697012 | KingOfLiu | B | Nov. 13, 2022, 1:07 a.m. | OK | Java 8 | TESTS | 15 | 233 | 0 | 1400 | |
180645695 | KichhuMichhu | B | Nov. 12, 2022, 3:57 p.m. | OK | Kotlin 1.6 | TESTS | 15 | 373 | 0 | 1400 | |
180699041 | xjcl | B | Nov. 13, 2022, 2:04 a.m. | OK | Kotlin 1.7 | TESTS | 16 | 561 | 22220800 | 1400 | |
180698818 | xjcl | B | Nov. 13, 2022, 1:59 a.m. | OK | Kotlin 1.7 | TESTS | 16 | 733 | 37273600 | 1400 | |
180647058 | gelbelachente | B | Nov. 12, 2022, 4:01 p.m. | OK | Kotlin 1.7 | TESTS | 15 | 841 | 45772800 | 1400 | |
180699348 | CHN_3Star | B | Nov. 13, 2022, 2:11 a.m. | OK | MS C++ 2017 | TESTS | 16 | 61 | 102400 | 1400 | |
180690796 | aael | B | Nov. 12, 2022, 9:45 p.m. | OK | MS C++ 2017 | TESTS | 15 | 61 | 102400 | 1400 | |
180648320 | MrB0NAN | B | Nov. 12, 2022, 4:06 p.m. | OK | MS C++ 2017 | TESTS | 15 | 61 | 307200 | 1400 | |
180699025 | CHN_3Star | B | Nov. 13, 2022, 2:03 a.m. | OK | MS C++ 2017 | TESTS | 16 | 62 | 102400 | 1400 | |
180698784 | CHN_3Star | B | Nov. 13, 2022, 1:58 a.m. | OK | MS C++ 2017 | TESTS | 16 | 62 | 102400 | 1400 | |
180661604 | codingstarfish | B | Nov. 12, 2022, 5:16 p.m. | OK | MS C++ 2017 | TESTS | 15 | 62 | 102400 | 1400 | |
180696984 | ishybee | B | Nov. 13, 2022, 1:06 a.m. | OK | MS C++ 2017 | TESTS | 15 | 62 | 307200 | 1400 | |
180696517 | LiuZhaocheng | B | Nov. 13, 2022, 12:51 a.m. | OK | MS C++ 2017 | TESTS | 15 | 62 | 307200 | 1400 | |
180662818 | Electrony | B | Nov. 12, 2022, 5:27 p.m. | OK | MS C++ 2017 | TESTS | 15 | 93 | 307200 | 1400 | |
180644594 | bfcxybsc | B | Nov. 12, 2022, 3:53 p.m. | OK | MS C++ 2017 | TESTS | 15 | 93 | 921600 | 1400 | |
180677601 | Nanouklol | B | Nov. 12, 2022, 7:07 p.m. | OK | Node.js | TESTS | 15 | 202 | 5222400 | 1400 | |
180690926 | Nanouklol | B | Nov. 12, 2022, 9:48 p.m. | OK | Node.js | TESTS | 15 | 248 | 5427200 | 1400 | |
180703306 | ninadc | B | Nov. 13, 2022, 3:50 a.m. | OK | PyPy 3 | TESTS | 18 | 623 | 7372800 | 1400 | |
180654829 | shinever | B | Nov. 12, 2022, 4:30 p.m. | OK | PyPy 3 | TESTS | 15 | 919 | 8704000 | 1400 | |
180659951 | Homeo | B | Nov. 12, 2022, 5:03 p.m. | OK | PyPy 3 | TESTS | 15 | 935 | 4198400 | 1400 | |
180659470 | Homeo | B | Nov. 12, 2022, 5 p.m. | OK | PyPy 3 | TESTS | 15 | 982 | 7168000 | 1400 | |
180660673 | devansh_7 | B | Nov. 12, 2022, 5:09 p.m. | OK | PyPy 3-64 | TESTS | 15 | 155 | 7884800 | 1400 | |
180677154 | pizet | B | Nov. 12, 2022, 7:01 p.m. | OK | PyPy 3-64 | TESTS | 15 | 155 | 9420800 | 1400 | |
180665977 | Genius3435 | B | Nov. 12, 2022, 5:58 p.m. | OK | PyPy 3-64 | TESTS | 15 | 156 | 9113600 | 1400 | |
180663548 | dalgu | B | Nov. 12, 2022, 5:33 p.m. | OK | PyPy 3-64 | TESTS | 15 | 171 | 7782400 | 1400 | |
180657562 | Juanm1 | B | Nov. 12, 2022, 4:49 p.m. | OK | PyPy 3-64 | TESTS | 15 | 187 | 8601600 | 1400 | |
180663277 | pursuit_of_happiness | B | Nov. 12, 2022, 5:31 p.m. | OK | PyPy 3-64 | TESTS | 15 | 202 | 9318400 | 1400 | |
180664065 | math_for_life | B | Nov. 12, 2022, 5:38 p.m. | OK | PyPy 3-64 | TESTS | 15 | 217 | 6041600 | 1400 | |
180709358 | insaneshawki | B | Nov. 13, 2022, 5:40 a.m. | OK | PyPy 3-64 | TESTS | 18 | 233 | 8601600 | 1400 | |
180660053 | gesuta | B | Nov. 12, 2022, 5:04 p.m. | OK | PyPy 3-64 | TESTS | 15 | 233 | 9216000 | 1400 | |
180659583 | gesuta | B | Nov. 12, 2022, 5 p.m. | OK | PyPy 3-64 | TESTS | 15 | 233 | 9216000 | 1400 | |
180700825 | minus400eq | B | Nov. 13, 2022, 2:50 a.m. | OK | Rust 2021 | TESTS | 18 | 31 | 409600 | 1400 | |
180658604 | p-a-t | B | Nov. 12, 2022, 4:54 p.m. | OK | Rust 2021 | TESTS | 15 | 31 | 921600 | 1400 | |
180701121 | minus400eq | B | Nov. 13, 2022, 2:57 a.m. | OK | Rust 2021 | TESTS | 18 | 46 | 409600 | 1400 | |
180681026 | fQuark | B | Nov. 12, 2022, 7:51 p.m. | OK | Rust 2021 | TESTS | 15 | 109 | 409600 | 1400 | |
180690534 | macosta | B | Nov. 12, 2022, 9:39 p.m. | OK | Rust 2021 | TESTS | 15 | 109 | 1024000 | 1400 | |
180680222 | fQuark | B | Nov. 12, 2022, 7:40 p.m. | OK | Rust 2021 | TESTS | 15 | 124 | 409600 | 1400 |
Back to search problems