Codeforces Round 504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final)

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
1023 Codeforces Round 504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) FINISHED False 8100 203009124 Aug. 17, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8764 ) A Single Wildcard Pattern Matching PROGRAMMING brute force implementation strings 1300

B'You are given two strings s and t . The string s consists of lowercase Latin letters and at most one wildcard character '* ', the string t consists only of lowercase Latin letters. The length of the string s equals n , the length of the string t equals m . The wildcard character '* ' in the string s (if any) can be replaced with an arbitrary sequence (possibly empty) of lowercase Latin letters. No other character of s can be replaced with anything. If it is possible to replace a wildcard character '* ' in s to obtain a string t , then the string t matches the pattern s . For example, if s= "aba*aba" then the following strings match it "abaaba", "abacaba" and "abazzzaba", but the following strings do not match: "ababa", "abcaaba", "codeforces", "aba1aba", "aba?aba". If the given string t matches the given string s , print "YES", otherwise print "NO". The first line contains two integers n and m ( 1 <= n, m <= 2 cdot 10^5 ) -- the length of the string s and the length of the string t , respectively. The second line contains string s of length n , which consists of lowercase Latin letters and at most one wildcard character '* '. The third line contains string t of length m , which consists only of lowercase Latin letters. Print "YES" (without quotes), if you can obtain the string t from the string s . Otherwise print "NO" (without quotes). In the first example a wildcard character '* ' can be replaced with a string "force". So the string s after this replacement is "codeforces" and the answer is "YES". In the second example a wildcard character '* ' can be replaced with an empty string. So the string s after this replacement is "vkcup" and the answer is "YES". There is no wildcard character '* ' in the third example and the strings "v" and "k" are different so the answer is "NO". In the fourth exam'...

Tutorials

Codeforces Round 504 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
53823076 hack1nt0 A May 6, 2019, 2:20 p.m. OK Clang++17 Diagnostics TESTS 110 93 16998400 1300
61387949 vjudge5 A Sept. 27, 2019, 7:55 p.m. OK Clang++17 Diagnostics TESTS 110 124 15462400 1300
41755823 despair A Aug. 18, 2018, 11:59 a.m. OK D TESTS 110 31 4198400 1300
65900898 hos.lyric A Nov. 28, 2019, 8:41 a.m. OK D TESTS 110 46 4198400 1300
42129085 Proskurnikov A Aug. 26, 2018, 5:13 p.m. OK Delphi TESTS 110 77 921600 1300
47834130 Capricornmean A Jan. 2, 2019, 9:03 a.m. OK FPC TESTS 110 31 1228800 1300
41962490 __ShaW A Aug. 22, 2018, 10:17 a.m. OK FPC TESTS 110 31 1843200 1300
60030360 pascal_handle A Sept. 4, 2019, 3:14 p.m. OK FPC TESTS 110 31 1945600 1300
41718830 PAG A Aug. 17, 2018, 4:29 p.m. OK FPC TESTS 110 31 1945600 1300
41753030 Jarazorg A Aug. 18, 2018, 10:35 a.m. OK FPC TESTS 110 46 1945600 1300
41729859 likcoras A Aug. 17, 2018, 9:02 p.m. OK GNU C TESTS 110 31 409600 1300
41856808 biswajit_saha A Aug. 19, 2018, 3:06 p.m. OK GNU C TESTS 110 31 409600 1300
41803458 SaimaJST A Aug. 18, 2018, 8:02 p.m. OK GNU C TESTS 110 31 409600 1300
41758552 vjudge1 A Aug. 18, 2018, 1:22 p.m. OK GNU C TESTS 110 31 409600 1300
41752634 vjudge4 A Aug. 18, 2018, 10:23 a.m. OK GNU C TESTS 110 31 409600 1300
41750990 anurag124 A Aug. 18, 2018, 9:34 a.m. OK GNU C TESTS 110 31 409600 1300
41749003 manishsingh5165 A Aug. 18, 2018, 8:46 a.m. OK GNU C TESTS 110 31 409600 1300
41747193 Kallaf A Aug. 18, 2018, 8:03 a.m. OK GNU C TESTS 110 31 409600 1300
41742571 vivek25 A Aug. 18, 2018, 6:18 a.m. OK GNU C TESTS 110 31 409600 1300
41732361 tanvirbd A Aug. 17, 2018, 11:38 p.m. OK GNU C TESTS 110 31 409600 1300
42227551 vjudge2 A Aug. 29, 2018, 4:08 a.m. OK GNU C++ TESTS 110 31 204800 1300
42226259 vjudge2 A Aug. 29, 2018, 2:44 a.m. OK GNU C++ TESTS 110 31 204800 1300
42224717 vjudge5 A Aug. 29, 2018, 1:17 a.m. OK GNU C++ TESTS 110 31 204800 1300
42083307 vjudge3 A Aug. 25, 2018, 9:22 a.m. OK GNU C++ TESTS 110 31 204800 1300
42083242 vjudge2 A Aug. 25, 2018, 9:21 a.m. OK GNU C++ TESTS 110 31 204800 1300
42083200 vjudge2 A Aug. 25, 2018, 9:20 a.m. OK GNU C++ TESTS 110 31 204800 1300
42083014 vjudge3 A Aug. 25, 2018, 9:14 a.m. OK GNU C++ TESTS 110 31 204800 1300
42082975 vjudge4 A Aug. 25, 2018, 9:13 a.m. OK GNU C++ TESTS 110 31 204800 1300
42080632 vjudge5 A Aug. 25, 2018, 8:02 a.m. OK GNU C++ TESTS 110 31 204800 1300
41992392 ksyx A Aug. 23, 2018, 9:42 a.m. OK GNU C++ TESTS 110 31 204800 1300
48782250 vjudge1 A Jan. 23, 2019, 7:18 a.m. OK GNU C11 TESTS 110 31 409600 1300
68301194 romarioputra A Jan. 6, 2020, 6:40 a.m. OK GNU C11 TESTS 110 31 409600 1300
66893155 amirmahdi_gfx A Dec. 14, 2019, 10:13 p.m. OK GNU C11 TESTS 110 31 409600 1300
66886687 Farnoodwtb A Dec. 14, 2019, 6:32 p.m. OK GNU C11 TESTS 110 31 409600 1300
49036047 vjudge1 A Jan. 27, 2019, 3:20 a.m. OK GNU C11 TESTS 110 31 409600 1300
48986148 vjudge1 A Jan. 26, 2019, 12:23 p.m. OK GNU C11 TESTS 110 31 409600 1300
48952444 vjudge3 A Jan. 26, 2019, 1:14 a.m. OK GNU C11 TESTS 110 31 409600 1300
48880011 vjudge3 A Jan. 24, 2019, 9:50 a.m. OK GNU C11 TESTS 110 31 409600 1300
48865278 vjudge2 A Jan. 24, 2019, 2:37 a.m. OK GNU C11 TESTS 110 31 409600 1300
48864417 vjudge3 A Jan. 24, 2019, 1:57 a.m. OK GNU C11 TESTS 110 31 409600 1300
44899101 yyb A Oct. 26, 2018, 8:11 a.m. OK GNU C++11 TESTS 110 31 204800 1300
61385868 vjudge2 A Sept. 27, 2019, 7:05 p.m. OK GNU C++11 TESTS 110 31 204800 1300
59514042 luogu_bot4 A Aug. 26, 2019, 8:58 a.m. OK GNU C++11 TESTS 110 31 204800 1300
52527977 vjudge5 A April 9, 2019, 12:18 p.m. OK GNU C++11 TESTS 110 31 204800 1300
52064860 luogu_bot5 A March 31, 2019, 4:38 a.m. OK GNU C++11 TESTS 110 31 204800 1300
48879230 vjudge5 A Jan. 24, 2019, 9:31 a.m. OK GNU C++11 TESTS 110 31 204800 1300
46890886 CrazyTeaMajor A Dec. 11, 2018, 5:57 a.m. OK GNU C++11 TESTS 110 31 204800 1300
46885807 CrazyTeaMajor A Dec. 11, 2018, 12:04 a.m. OK GNU C++11 TESTS 110 31 204800 1300
44620048 Alessa0 A Oct. 21, 2018, 5:43 a.m. OK GNU C++11 TESTS 110 31 204800 1300
44491085 luogu_bot1 A Oct. 18, 2018, 2:29 p.m. OK GNU C++11 TESTS 110 31 204800 1300
42116313 HumptyDumpty A Aug. 26, 2018, 9:56 a.m. OK GNU C++14 TESTS 110 30 819200 1300
55599443 vasu2907 A June 15, 2019, 5:15 p.m. OK GNU C++14 TESTS 110 30 819200 1300
51945071 gvshukla321 A March 28, 2019, 4:26 p.m. OK GNU C++14 TESTS 110 30 819200 1300
41732625 Best_Darius_VN A Aug. 17, 2018, 11:56 p.m. OK GNU C++14 TESTS 110 30 819200 1300
41726652 ucrop A Aug. 17, 2018, 7:21 p.m. OK GNU C++14 TESTS 110 30 819200 1300
41756864 Piurko A Aug. 18, 2018, 12:30 p.m. OK GNU C++14 TESTS 110 30 921600 1300
41742755 codekode A Aug. 18, 2018, 6:24 a.m. OK GNU C++14 TESTS 110 30 1638400 1300
58139151 Black_hat123 A Aug. 1, 2019, 5:22 p.m. OK GNU C++14 TESTS 110 31 409600 1300
69471893 abhi_shk27 A Jan. 24, 2020, 2:48 p.m. OK GNU C++14 TESTS 110 31 409600 1300
56278980 Samaritan123 A June 29, 2019, 3:44 p.m. OK GNU C++14 TESTS 110 31 409600 1300
44760907 wladw A Oct. 24, 2018, 7:05 a.m. OK GNU C++17 TESTS 110 30 614400 1300
41888880 cjnwq A Aug. 20, 2018, 5:58 a.m. OK GNU C++17 TESTS 110 30 819200 1300
41968325 Hellis A Aug. 22, 2018, 1:33 p.m. OK GNU C++17 TESTS 110 30 819200 1300
47376364 Mayimg A Dec. 22, 2018, 5:37 p.m. OK GNU C++17 TESTS 110 30 819200 1300
51997563 buddy_1 A March 30, 2019, 3:42 a.m. OK GNU C++17 TESTS 110 30 819200 1300
41739354 2014CAIS01 A Aug. 18, 2018, 4:36 a.m. OK GNU C++17 TESTS 110 30 819200 1300
60522156 rakati A Sept. 14, 2019, 8:53 a.m. OK GNU C++17 TESTS 110 31 409600 1300
61038725 bhamrick A Sept. 21, 2019, 9:40 p.m. OK GNU C++17 TESTS 110 31 409600 1300
62854484 xsjlmzs A Oct. 18, 2019, 8:43 a.m. OK GNU C++17 TESTS 110 31 409600 1300
69395633 AC_AR A Jan. 23, 2020, 6:09 a.m. OK GNU C++17 TESTS 110 31 409600 1300
41820435 upvas A Aug. 19, 2018, 9:20 a.m. OK Go TESTS 110 46 2048000 1300
41819980 upvas A Aug. 19, 2018, 9:04 a.m. OK Go TESTS 110 46 2048000 1300
41757856 tusupov A Aug. 18, 2018, 1:01 p.m. OK Go TESTS 110 46 2355200 1300
43705430 hetzi A Oct. 2, 2018, 9:17 p.m. OK Haskell TESTS 110 46 16998400 1300
45693058 Sentient5 A Nov. 13, 2018, 10:20 p.m. OK Java 8 TESTS 110 124 0 1300
69634925 conquerorArpit A Jan. 27, 2020, 6:15 p.m. OK Java 8 TESTS 110 124 0 1300
67037766 Ahmad A Dec. 16, 2019, 6:01 p.m. OK Java 8 TESTS 110 124 0 1300
66564138 Oopsimbad A Dec. 9, 2019, 8:35 p.m. OK Java 8 TESTS 110 124 0 1300
64019084 an09mous A Nov. 1, 2019, 3:32 p.m. OK Java 8 TESTS 110 124 0 1300
60506218 zekigurbuz A Sept. 13, 2019, 9:51 p.m. OK Java 8 TESTS 110 124 0 1300
59204082 garnacha A Aug. 21, 2019, 6:13 a.m. OK Java 8 TESTS 110 124 0 1300
56026587 saurabhs1206 A June 25, 2019, 7:12 a.m. OK Java 8 TESTS 110 124 0 1300
55310665 Ikari_stream A June 8, 2019, 5:23 p.m. OK Java 8 TESTS 110 124 0 1300
45031840 sobx41 A Oct. 29, 2018, 4:50 a.m. OK Java 8 TESTS 110 124 0 1300
42660780 NguyenHungCuong A Sept. 8, 2018, 4:01 a.m. OK JavaScript TESTS 110 31 0 1300
41902425 akaki1996 A Aug. 20, 2018, 12:52 p.m. OK JavaScript TESTS 110 46 102400 1300
41749816 0442A403 A Aug. 18, 2018, 9:07 a.m. OK Kotlin TESTS 110 155 0 1300
42916840 erenerisken A Sept. 16, 2018, 10:05 a.m. OK Kotlin TESTS 110 218 0 1300
55015552 og.kostya A June 3, 2019, 12:10 p.m. OK Mono C# TESTS 110 62 1945600 1300
41730780 Evgenii_Stepanov A Aug. 17, 2018, 9:48 p.m. OK Mono C# TESTS 110 62 2662400 1300
41746600 mrthannn A Aug. 18, 2018, 7:49 a.m. OK Mono C# TESTS 110 62 5017600 1300
41730760 Nathan.Sproul A Aug. 17, 2018, 9:47 p.m. OK Mono C# TESTS 110 62 5120000 1300
49216949 nemars A Jan. 30, 2019, 5:30 p.m. OK Mono C# TESTS 110 62 6348800 1300
41756948 SARDAR_E_JANGAL A Aug. 18, 2018, 12:33 p.m. OK Mono C# TESTS 110 62 9420800 1300
41733603 iamanvesh A Aug. 18, 2018, 12:52 a.m. OK Mono C# TESTS 110 77 2662400 1300
41720474 hacker2302 A Aug. 17, 2018, 4:36 p.m. OK Mono C# TESTS 110 77 5017600 1300
42234295 blackstone1 A Aug. 29, 2018, 8:37 a.m. OK Mono C# TESTS 110 77 6246400 1300
53124261 vjudge5 A April 22, 2019, 1:01 p.m. OK MS C++ TESTS 110 31 409600 1300
51744127 vjudge5 A March 23, 2019, 7 a.m. OK MS C++ TESTS 110 31 409600 1300
51787803 vjudge3 A March 24, 2019, 11:27 a.m. OK MS C++ TESTS 110 31 409600 1300
51790769 vjudge2 A March 24, 2019, 12:42 p.m. OK MS C++ TESTS 110 31 409600 1300
52528115 vjudge1 A April 9, 2019, 12:21 p.m. OK MS C++ TESTS 110 31 409600 1300
52567254 vjudge2 A April 10, 2019, 12:53 p.m. OK MS C++ TESTS 110 31 409600 1300
51739200 vjudge2 A March 23, 2019, 4:54 a.m. OK MS C++ TESTS 110 31 409600 1300
51739704 vjudge5 A March 23, 2019, 5:11 a.m. OK MS C++ TESTS 110 31 409600 1300
51740796 vjudge4 A March 23, 2019, 5:42 a.m. OK MS C++ TESTS 110 31 409600 1300
51740984 vjudge2 A March 23, 2019, 5:46 a.m. OK MS C++ TESTS 110 31 409600 1300
51790741 2018030101037 A March 24, 2019, 12:42 p.m. OK MS C++ 2017 TESTS 110 31 409600 1300
64167428 vjudge4 A Nov. 3, 2019, 4:53 p.m. OK MS C++ 2017 TESTS 110 31 819200 1300
62870040 Mad112233 A Oct. 18, 2019, 1:29 p.m. OK MS C++ 2017 TESTS 110 31 819200 1300
58866697 ZA139 A Aug. 15, 2019, 1:39 p.m. OK MS C++ 2017 TESTS 110 31 921600 1300
56980768 sladkayaKlubnichka A July 13, 2019, 1:49 p.m. OK MS C++ 2017 TESTS 110 46 819200 1300
59903425 Still_Theory A Sept. 2, 2019, 2:26 p.m. OK MS C++ 2017 TESTS 110 46 1024000 1300
61387932 vjudge5 A Sept. 27, 2019, 7:54 p.m. OK MS C++ 2017 TESTS 110 639 921600 1300
42105991 ruxse A Aug. 26, 2018, 12:38 a.m. OK Node.js TESTS 110 171 9523200 1300
42105956 Ruxr A Aug. 26, 2018, 12:35 a.m. OK Node.js TESTS 110 171 9523200 1300
62518446 VanilieProgramatoare A Oct. 13, 2019, 3:02 p.m. OK PascalABC.NET TESTS 110 202 0 1300
42158115 mayakin A Aug. 27, 2018, 4:09 p.m. OK PHP TESTS 110 46 0 1300
41742218 takepan2 A Aug. 18, 2018, 6:05 a.m. OK PHP TESTS 110 46 0 1300
41748357 SerChirag A Aug. 18, 2018, 8:31 a.m. OK PyPy 2 TESTS 110 124 1536000 1300
41725160 anshuman16423 A Aug. 17, 2018, 6:58 p.m. OK PyPy 2 TESTS 110 139 1638400 1300
41881717 gilou A Aug. 20, 2018, 1:59 a.m. OK PyPy 2 TESTS 110 140 1536000 1300
41844290 SolitaryWayfarer A Aug. 19, 2018, 2:11 p.m. OK PyPy 2 TESTS 110 140 1536000 1300
41729363 kakkarotssj A Aug. 17, 2018, 8:44 p.m. OK PyPy 2 TESTS 110 140 2150400 1300
55291344 shafwanur010 A June 8, 2019, 7:51 a.m. OK PyPy 2 TESTS 110 140 4608000 1300
41805395 Hardsaggu A Aug. 18, 2018, 9:17 p.m. OK PyPy 2 TESTS 110 140 4915200 1300
41746934 deterministic_p A Aug. 18, 2018, 7:57 a.m. OK PyPy 2 TESTS 110 155 1536000 1300
42002282 Byte-Rider A Aug. 23, 2018, 3:59 p.m. OK PyPy 2 TESTS 110 155 10444800 1300
42002276 Byte-Rider A Aug. 23, 2018, 3:59 p.m. OK PyPy 2 TESTS 110 155 10444800 1300
51330325 cs1g A March 15, 2019, 11:53 a.m. OK PyPy 3 TESTS 110 140 4300800 1300
52505347 md_akash1 A April 8, 2019, 6:19 p.m. OK PyPy 3 TESTS 110 140 4505600 1300
44568338 omarnvidia A Oct. 20, 2018, 2:51 a.m. OK PyPy 3 TESTS 110 140 4710400 1300
61387604 vjudge5 A Sept. 27, 2019, 7:47 p.m. OK PyPy 3 TESTS 110 155 2457600 1300
41735955 nadchu A Aug. 18, 2018, 2:24 a.m. OK PyPy 3 TESTS 110 155 4198400 1300
45166349 kaname_madoka123 A Nov. 1, 2018, 11:16 a.m. OK PyPy 3 TESTS 110 155 4710400 1300
42185541 LordVader A Aug. 27, 2018, 9:01 p.m. OK PyPy 3 TESTS 110 155 4710400 1300
41726636 ecnerwala A Aug. 17, 2018, 7:21 p.m. OK PyPy 3 TESTS 110 155 4710400 1300
41736933 yumechi0525 A Aug. 18, 2018, 3 a.m. OK PyPy 3 TESTS 110 155 5427200 1300
41737603 piyushkumarmaurya A Aug. 18, 2018, 3:25 a.m. OK PyPy 3 TESTS 110 155 5939200 1300
45946766 EoinDavey A Nov. 19, 2018, 1:22 a.m. OK Python 2 TESTS 110 171 716800 1300
44394033 Ex0d1a shriamrut A Oct. 16, 2018, 9:51 a.m. OK Python 2 TESTS 110 171 716800 1300
41927338 nealzane A Aug. 21, 2018, 8:10 a.m. OK Python 2 TESTS 110 171 716800 1300
41796594 padfoot_prongs A Aug. 18, 2018, 5:01 p.m. OK Python 2 TESTS 110 171 716800 1300
41731740 munchor A Aug. 17, 2018, 10:50 p.m. OK Python 2 TESTS 110 171 716800 1300
41731276 sirjan13 A Aug. 17, 2018, 10:18 p.m. OK Python 2 TESTS 110 171 716800 1300
41728836 Veras A Aug. 17, 2018, 8:24 p.m. OK Python 2 TESTS 110 186 716800 1300
41733123 johnzeng A Aug. 18, 2018, 12:27 a.m. OK Python 2 TESTS 110 186 819200 1300
41735299 EternalAlexander A Aug. 18, 2018, 2:02 a.m. OK Python 2 TESTS 110 187 1024000 1300
41738052 biltharesatyendra A Aug. 18, 2018, 3:43 a.m. OK Python 2 TESTS 110 187 4096000 1300
61193617 vjudge4 A Sept. 24, 2019, 4:21 a.m. OK Python 3 TESTS 110 109 921600 1300
51487218 SamuelLH A March 19, 2019, 2:03 p.m. OK Python 3 TESTS 110 109 921600 1300
49356827 nayan32biswas A Feb. 2, 2019, 11:32 a.m. OK Python 3 TESTS 110 109 921600 1300
47605116 xumouyi A Dec. 28, 2018, 4:01 a.m. OK Python 3 TESTS 110 109 921600 1300
48030502 Pro100Yan A Jan. 6, 2019, 12:05 p.m. OK Python 3 TESTS 110 109 1024000 1300
47217492 irvlin A Dec. 18, 2018, 3:55 p.m. OK Python 3 TESTS 110 109 1024000 1300
41748999 heimdall A Aug. 18, 2018, 8:46 a.m. OK Python 3 TESTS 110 109 1024000 1300
41737905 wangyiming123 A Aug. 18, 2018, 3:37 a.m. OK Python 3 TESTS 110 109 1024000 1300
53029766 youness.amhaouch A April 19, 2019, 10:10 p.m. OK Python 3 TESTS 110 109 1126400 1300
51407101 a.ghaffari.1372 A March 17, 2019, 10:21 a.m. OK Python 3 TESTS 110 109 1126400 1300
41738272 koikotya A Aug. 18, 2018, 3:52 a.m. OK Ruby TESTS 110 93 1126400 1300
42698809 cielavenir A Sept. 9, 2018, 9:10 a.m. OK Ruby TESTS 110 109 921600 1300
62633128 sansen A Oct. 15, 2019, 4:01 p.m. OK Rust TESTS 110 31 2969600 1300
42447042 AlexProk A Sept. 4, 2018, 4:46 a.m. OK Scala TESTS 110 499 0 1300
42767089 yakamoto A Sept. 11, 2018, 1:41 p.m. OK Scala TESTS 110 545 0 1300

remove filters

Back to search problems