Codeforces Round 103 (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
144 Codeforces Round 103 (Div. 2) FINISHED False 7200 411058451 Jan. 18, 2012, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4046 ) C Anagram Search PROGRAMMING implementation strings 1500

B'A string t is called an anagram of the string s, if it is possible to rearrange letters in t so that it is identical to the string s. For example, the string "aab" is an anagram of the string "aba" and the string "aaa" is not. The string t is called a substring of the string s if it can be read starting from some position in the string s. For example, the string "aba" has six substrings: "a", "b", "a", "ab", "ba", "aba". You are given a string s, consisting of lowercase Latin letters and characters "?". You are also given a string p, consisting of lowercase Latin letters only. Let 's assume that a string is good if you can obtain an anagram of the string p from it, replacing the "?" characters by Latin letters. Each "?" can be replaced by exactly one character of the Latin alphabet. For example, if the string p = xc2 xababa xc2 xbb, then the string "a??" is good, and the string xc2 xab?bc xc2 xbb is not. Your task is to find the number of good substrings of the string s (identical substrings must be counted in the answer several times). The first line is non-empty string s, consisting of no more than 105 lowercase Latin letters and characters "?". The second line is non-empty string p, consisting of no more than 105 lowercase Latin letters. Please note that the length of the string p can exceed the length of the string s. Print the single number representing the number of good substrings of string s. Two substrings are considered different in their positions of occurrence are different. Thus, if some string occurs several times, then it should be counted the same number of times. Consider the first sample test. Here the string s has two good substrings: "b??" (after we replace the question marks we get "baa"), "???" (after we replace the question marks we get "baa"). Let 's consider the second sample test. Here the string s has two good substrings: "ab?" ("?" can be replaced by "c"), "b?c" ("?" can be replaced by "a").'...

Tutorials

Codeforces Round #103 (Div. 2) Разбор Задач.

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40588825 Heshamovic C July 20, 2018, 8:10 p.m. OK Clang++17 Diagnostics TESTS 41 186 34508800 1500
12408102 VAVAvile C Aug. 8, 2015, 1:49 a.m. OK FPC TESTS 41 62 307200 1500
16908618 Ru_Tornado C March 24, 2016, 3:17 p.m. OK FPC TESTS 41 62 2048000 1500
33389341 TShT C Dec. 18, 2017, 6:24 p.m. OK FPC TESTS 41 62 13926400 1500
23464127 tieuchanlong C Dec. 31, 2016, 6:24 a.m. OK FPC TESTS 41 92 23859200 1500
11849127 smjlord068 C June 30, 2015, 10:45 a.m. OK GNU C TESTS 41 30 204800 1500
20176848 avinash_47 C Aug. 26, 2016, 2:12 p.m. OK GNU C TESTS 41 30 2457600 1500
15351711 asma_chy C Jan. 14, 2016, 4:53 p.m. OK GNU C TESTS 41 62 204800 1500
14766726 hardiknegi C Dec. 11, 2015, 10:01 p.m. OK GNU C++ TESTS 41 30 0 1500
14193688 pqhuy98 C Nov. 11, 2015, 7:50 a.m. OK GNU C++ TESTS 41 30 0 1500
14181760 130705009 C Nov. 10, 2015, 8:43 a.m. OK GNU C++ TESTS 41 30 0 1500
20456733 gzz C Sept. 8, 2016, 11:15 a.m. OK GNU C++ TESTS 41 30 0 1500
15352050 vjudge5 C Jan. 14, 2016, 4:54 p.m. OK GNU C++ TESTS 41 30 0 1500
16801074 guanhuai04 C March 19, 2016, 4:37 a.m. OK GNU C++ TESTS 41 30 204800 1500
30760388 Who__Cares C Sept. 26, 2017, 6:40 p.m. OK GNU C++ TESTS 41 30 204800 1500
29915093 vjudge4 C Aug. 30, 2017, 10:56 a.m. OK GNU C++ TESTS 41 30 204800 1500
14821910 abhi1agarwal C Dec. 15, 2015, 5:10 p.m. OK GNU C++ TESTS 41 30 204800 1500
14190970 scier C Nov. 10, 2015, 11:45 p.m. OK GNU C++ TESTS 41 30 204800 1500
58962219 rainboy C Aug. 17, 2019, 3:50 p.m. OK GNU C11 TESTS 41 62 204800 1500
61508757 teja1908 C Sept. 29, 2019, 3:33 p.m. OK GNU C11 TESTS 41 62 1024000 1500
44746412 siva1010 C Oct. 23, 2018, 5:08 p.m. OK GNU C11 TESTS 41 92 204800 1500
27387336 blue1013 C May 27, 2017, 12:06 p.m. OK GNU C++11 TESTS 41 30 0 1500
13950806 Panqvela C Oct. 30, 2015, 11:15 a.m. OK GNU C++11 TESTS 41 30 0 1500
32095333 Rebirth_A C Nov. 6, 2017, 12:23 p.m. OK GNU C++11 TESTS 41 30 0 1500
20475495 y_shindoh C Sept. 9, 2016, 9:35 a.m. OK GNU C++11 TESTS 41 30 102400 1500
15883428 OmarKhaled_ C Feb. 7, 2016, 5:42 p.m. OK GNU C++11 TESTS 41 30 204800 1500
29915090 fyy2603 C Aug. 30, 2017, 10:56 a.m. OK GNU C++11 TESTS 41 30 204800 1500
19384788 XenoAmess C July 24, 2016, 1:36 p.m. OK GNU C++11 TESTS 41 30 204800 1500
18723383 Hamzqq9 C June 25, 2016, 5:38 p.m. OK GNU C++11 TESTS 41 30 204800 1500
15415621 Daddy_Daddy C Jan. 17, 2016, 2:09 p.m. OK GNU C++11 TESTS 41 30 204800 1500
15415603 Daddy_Daddy C Jan. 17, 2016, 2:07 p.m. OK GNU C++11 TESTS 41 30 204800 1500
21117028 sonupmandal C Oct. 2, 2016, 2:11 p.m. OK GNU C++14 TESTS 41 30 204800 1500
30573450 AMnu C Sept. 21, 2017, 10:12 a.m. OK GNU C++14 TESTS 41 30 204800 1500
29789071 gaporf C Aug. 25, 2017, 5:56 p.m. OK GNU C++14 TESTS 41 30 204800 1500
30199748 hpkt.pkt C Sept. 8, 2017, 10:17 a.m. OK GNU C++14 TESTS 41 30 307200 1500
31051098 Amerisma C Oct. 6, 2017, 2:35 a.m. OK GNU C++14 TESTS 41 30 512000 1500
30220856 KeyurJain C Sept. 9, 2017, 8:40 a.m. OK GNU C++14 TESTS 41 30 512000 1500
27461103 _samariddin_ C May 31, 2017, 7:23 a.m. OK GNU C++14 TESTS 41 30 512000 1500
31193115 amit__ C Oct. 10, 2017, 2:55 p.m. OK GNU C++14 TESTS 41 30 512000 1500
32560595 Hosamk92 C Nov. 22, 2017, 7:51 p.m. OK GNU C++14 TESTS 41 30 512000 1500
46038349 etman.x.x C Nov. 21, 2018, 5:47 p.m. OK GNU C++14 TESTS 41 30 512000 1500
42491392 zhanghuangying C Sept. 5, 2018, 12:16 p.m. OK GNU C++17 TESTS 41 30 512000 1500
56945010 spaesk C July 12, 2019, 9:21 p.m. OK GNU C++17 TESTS 41 30 512000 1500
50392796 hdsingharora99 C Feb. 23, 2019, 2:34 p.m. OK GNU C++17 TESTS 41 60 512000 1500
46738696 vjudge3 C Dec. 7, 2018, 10:41 p.m. OK GNU C++17 TESTS 41 60 512000 1500
46738684 vjudge2 C Dec. 7, 2018, 10:40 p.m. OK GNU C++17 TESTS 41 60 512000 1500
46738667 vjudge4 C Dec. 7, 2018, 10:38 p.m. OK GNU C++17 TESTS 41 60 512000 1500
66425122 9taufeeque9 C Dec. 6, 2019, 8:59 p.m. OK GNU C++17 TESTS 41 60 512000 1500
58645769 shifanyiakioi C Aug. 12, 2019, 5:42 a.m. OK GNU C++17 TESTS 41 60 512000 1500
58646310 shifanyiakioi C Aug. 12, 2019, 5:55 a.m. OK GNU C++17 TESTS 41 60 512000 1500
44301239 vjudge5 C Oct. 14, 2018, 10:42 a.m. OK GNU C++17 TESTS 41 60 614400 1500
35834697 ______k______ C March 2, 2018, 12:10 p.m. OK Haskell TESTS 41 404 59699200 1500
35839973 ______u______ C March 2, 2018, 2:09 p.m. OK Haskell TESTS 41 404 59699200 1500
35839970 ______n______ C March 2, 2018, 2:09 p.m. OK Haskell TESTS 41 404 59699200 1500
35839299 _____k_____ C March 2, 2018, 1:50 p.m. OK Haskell TESTS 41 404 59699200 1500
35839294 _____i_____ C March 2, 2018, 1:50 p.m. OK Haskell TESTS 41 404 59699200 1500
35834736 ______h______ C March 2, 2018, 12:10 p.m. OK Haskell TESTS 41 404 59699200 1500
35834509 ______i______ C March 2, 2018, 12:05 p.m. OK Haskell TESTS 41 404 59699200 1500
35830978 ______M______ C March 2, 2018, 9:32 a.m. OK Haskell TESTS 41 404 59699200 1500
13769192 miguel_palma C Oct. 21, 2015, 10:25 a.m. OK Java 7 TESTS 41 184 0 1500
15904218 MedoN11 C Feb. 9, 2016, 1:10 a.m. OK Java 7 TESTS 41 218 0 1500
14994221 mIchanic C Dec. 24, 2015, 7:14 p.m. OK Java 7 TESTS 41 218 0 1500
14469418 DukeOfYork C Nov. 25, 2015, 12:50 p.m. OK Java 7 TESTS 41 218 0 1500
13769525 ALoremia C Oct. 21, 2015, 10:50 a.m. OK Java 7 TESTS 41 218 0 1500
14179045 fabiankasUN C Nov. 10, 2015, 1:07 a.m. OK Java 7 TESTS 41 248 0 1500
13781063 armandoluja C Oct. 21, 2015, 8:57 p.m. OK Java 7 TESTS 41 280 0 1500
16067505 Nirmit C Feb. 17, 2016, 8 a.m. OK Java 7 TESTS 41 280 13312000 1500
11951303 kirik13 C July 6, 2015, 5:26 p.m. OK Java 7 TESTS 41 312 0 1500
15442908 MazzForces C Jan. 19, 2016, 6:40 p.m. OK Java 7 TESTS 41 374 175206400 1500
44457693 ViciousCoder C Oct. 17, 2018, 6:39 p.m. OK Java 8 TESTS 41 218 0 1500
48511539 ragad_ag C Jan. 17, 2019, 9:49 p.m. OK Java 8 TESTS 41 218 0 1500
31120180 MostafaAbdullah C Oct. 7, 2017, 3:23 p.m. OK Java 8 TESTS 41 218 0 1500
27214469 da_201501181 C May 19, 2017, 12:39 p.m. OK Java 8 TESTS 41 218 0 1500
27211001 Maulik_Patel C May 19, 2017, 8:55 a.m. OK Java 8 TESTS 41 218 0 1500
31672314 deepakjain C Oct. 24, 2017, 7:34 a.m. OK Java 8 TESTS 41 218 20582400 1500
29254726 mahestynasser C Aug. 7, 2017, 6:11 a.m. OK Java 8 TESTS 41 218 20582400 1500
57280727 saurabhs1206 C July 18, 2019, 12:40 p.m. OK Java 8 TESTS 41 248 0 1500
48018856 S010M C Jan. 6, 2019, 3:16 a.m. OK Java 8 TESTS 41 248 0 1500
44622222 KulikAlex C Oct. 21, 2018, 7:05 a.m. OK Java 8 TESTS 41 248 0 1500
60223081 rego97 C Sept. 7, 2019, 2:23 p.m. OK Kotlin TESTS 41 280 0 1500
53678553 ivanidze.kirov C May 2, 2019, 5:30 p.m. OK Mono C# TESTS 41 122 716800 1500
14837323 og.kostya C Dec. 16, 2015, 5:01 p.m. OK MS C# TESTS 41 92 819200 1500
16052943 xieofxie C Feb. 16, 2016, 8:49 a.m. OK MS C++ TESTS 41 30 204800 1500
19449741 devilsanek C July 27, 2016, 9:34 p.m. OK MS C++ TESTS 41 30 409600 1500
18703279 inmathwetrust C June 24, 2016, 3:10 p.m. OK MS C++ TESTS 41 30 409600 1500
21854024 LoDThe C Oct. 28, 2016, 5:45 p.m. OK MS C++ TESTS 41 30 409600 1500
33311251 Tampere C Dec. 16, 2017, 2:55 p.m. OK MS C++ TESTS 41 30 2457600 1500
26300532 Maffka C April 11, 2017, 1:57 p.m. OK MS C++ TESTS 41 30 2457600 1500
12862804 CIKE C Sept. 6, 2015, 8:31 a.m. OK MS C++ TESTS 41 60 204800 1500
12490404 heheniyilian C Aug. 13, 2015, 10:33 a.m. OK MS C++ TESTS 41 60 409600 1500
13212686 yangxinthu C Sept. 25, 2015, 3:43 a.m. OK MS C++ TESTS 41 60 409600 1500
16956056 vjudge4 C March 26, 2016, 12:36 p.m. OK MS C++ TESTS 41 60 2252800 1500
54451268 vshirochenko C May 21, 2019, 1:38 p.m. OK MS C++ 2017 TESTS 41 92 11161600 1500
13223982 liuzhaoliang1988 C Sept. 25, 2015, 7:02 p.m. OK Ocaml TESTS 41 62 512000 1500
62570825 mm944 C Oct. 14, 2019, 2:26 p.m. OK PascalABC.NET TESTS 41 810 63692800 1500
37030487 mayakin C April 6, 2018, 7:36 p.m. OK PHP TESTS 41 156 6041600 1500
58575956 anshuman16423 C Aug. 11, 2019, 12:22 p.m. OK PyPy 2 TESTS 41 374 2662400 1500
18233770 Eeyore C June 3, 2016, 3:54 p.m. OK PyPy 2 TESTS 41 404 24576000 1500
46905907 HeyLaCC C Dec. 11, 2018, 2:13 p.m. OK PyPy 3 TESTS 41 372 3072000 1500
64737720 D_J_Z C Nov. 12, 2019, 10:56 a.m. OK PyPy 3 TESTS 41 372 4198400 1500
14561653 merolish C Nov. 29, 2015, 6:15 p.m. OK PyPy 3 TESTS 41 404 2969600 1500
69997837 beethoven97 C Feb. 1, 2020, 10:50 p.m. OK PyPy 3 TESTS 41 436 3788800 1500
68939181 nethish C Jan. 16, 2020, 1:51 p.m. OK PyPy 3 TESTS 41 780 7577600 1500
51548917 cs1g C March 19, 2019, 10:09 p.m. OK PyPy 3 TESTS 41 934 8499200 1500
56028553 sorry_im_smurfing C June 25, 2019, 8:17 a.m. OK PyPy 3 TESTS 41 996 9830400 1500
22659294 APwhitehat C Dec. 2, 2016, 2:20 p.m. OK Python 2 TESTS 41 934 1740800 1500
38483268 Patiala_Peg C May 21, 2018, 12:33 p.m. OK Python 2 TESTS 41 934 1843200 1500
24086484 ahxgw C Jan. 24, 2017, 7:10 a.m. OK Python 2 TESTS 41 1496 6553600 1500
29760035 Qumeric C Aug. 24, 2017, 7:22 p.m. OK Python 3 TESTS 41 530 307200 1500
42134547 Mk_Python_v1 C Aug. 26, 2018, 9:56 p.m. OK Python 3 TESTS 41 686 204800 1500
12713008 minimario C Aug. 26, 2015, 9:17 p.m. OK Python 3 TESTS 41 966 307200 1500
42535637 nikchee1 C Sept. 6, 2018, 1:06 a.m. OK Python 3 TESTS 41 1622 409600 1500
55743910 Mohamed_Ayman C June 19, 2019, 8:59 a.m. OK Python 3 TESTS 41 1994 307200 1500

remove filters

Back to search problems