Codeforces Round 390 (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
754 Codeforces Round 390 (Div. 2) FINISHED False 7200 292692323 Jan. 6, 2017, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 561 ) E Dasha and cyclic table PROGRAMMING bitmasks brute force fft strings trees 2800

Dasha is fond of challenging puzzles: Rubik's Cube 3 × 3 × 3 , 4 × 4 × 4 , 5 × 5 × 5 and so on. This time she has a cyclic table of size n × m , and each cell of the table contains a lowercase English letter. Each cell has coordinates ( i , j ) ( 0 ≤ i < n , 0 ≤ j < m ). The table is cyclic means that to the right of cell ( i , j ) there is the cell , and to the down there is the cell . Dasha has a pattern as well. A pattern is a non-cyclic table of size r × c . Each cell is either a lowercase English letter or a question mark. Each cell has coordinates ( i , j ) ( 0 ≤ i < r , 0 ≤ j < c ). The goal of the puzzle is to find all the appearance positions of the pattern in the cyclic table. We say that the cell ( i , j ) of cyclic table is an appearance position, if for every pair ( x , y ) such that 0 ≤ x < r and 0 ≤ y < c one of the following conditions holds: There is a question mark in the cell ( x , y ) of the pattern, or The cell of the cyclic table equals to the cell ( x , y ) of the pattern. Dasha solved this puzzle in no time, as well as all the others she ever tried. Can you solve it?. The first line contains two integers n and m ( 1 ≤ n , m ≤ 400 ) — the cyclic table sizes. Each of the next n lines contains a string of m lowercase English characters — the description of the cyclic table. The next line contains two integers r and c ( 1 ≤ r , c ≤ 400 ) — the sizes of the pattern. Each of the next r lines contains a string of c lowercase English letter and/or characters ' ? ' — the description of the pattern. Print n lines. Each of the n lines should contain m characters. Each of the characters should equal ' 0 ' or ' 1 '. The j -th character of the i -th ( 0 -indexed) line should be equal to ' 1 ', in case the cell ( i , j ) is an appearance position, otherwise it should be equal to ' 0 '.

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
24003303 zhangJvv E Jan. 21, 2017, 5:56 a.m. OK GNU C++ TESTS 66 373 145305600 2800
30462263 vjudge2 E Sept. 18, 2017, 11:35 a.m. OK GNU C++ TESTS 66 717 2969600 2800
24024004 AkaneSasu E Jan. 22, 2017, 6:16 a.m. OK GNU C++ TESTS 66 1200 108748800 2800
23644424 vjudge3 E Jan. 8, 2017, 10:41 a.m. OK GNU C++ TESTS 66 1497 94924800 2800
25139551 cilebritain E March 2, 2017, 3:45 a.m. OK GNU C++ TESTS 66 1621 224563200 2800
23644036 vjudge1 E Jan. 8, 2017, 10:14 a.m. OK GNU C++ TESTS 66 1669 94924800 2800
27356523 werertyuiertyu E May 26, 2017, 1:34 p.m. OK GNU C++ TESTS 66 1965 5427200 2800
27356475 werertyuiertyu E May 26, 2017, 1:32 p.m. OK GNU C++ TESTS 66 1965 5427200 2800
27356398 werertyuiertyu E May 26, 2017, 1:28 p.m. OK GNU C++ TESTS 66 1965 5427200 2800
27356529 potouiuiiiu E May 26, 2017, 1:34 p.m. OK GNU C++ TESTS 66 1981 5427200 2800
23878002 Wuvin E Jan. 16, 2017, 9:08 a.m. OK GNU C++11 TESTS 66 327 44236800 2800
29585961 ofi E Aug. 19, 2017, 2:28 a.m. OK GNU C++11 TESTS 66 358 42700800 2800
23614092 savinov E Jan. 6, 2017, 10:51 p.m. OK GNU C++11 TESTS 66 358 44748800 2800
23675130 anta E Jan. 10, 2017, 5:42 a.m. OK GNU C++11 TESTS 66 390 36556800 2800
23640761 FizzyDavid E Jan. 8, 2017, 6:10 a.m. OK GNU C++11 TESTS 66 405 44236800 2800
23617246 rxdoi E Jan. 7, 2017, 5:38 a.m. OK GNU C++11 TESTS 66 452 49459200 2800
23678514 anta E Jan. 10, 2017, 9:54 a.m. OK GNU C++11 TESTS 66 561 11980800 2800
24357122 maups E Feb. 2, 2017, 1:38 a.m. OK GNU C++11 TESTS 66 592 36966400 2800
23675369 anta E Jan. 10, 2017, 6:01 a.m. OK GNU C++11 TESTS 66 608 11980800 2800
23637569 RomeoFantastik E Jan. 7, 2017, 10:09 p.m. OK GNU C++11 TESTS 66 655 2969600 2800
31696770 vjudge1 E Oct. 25, 2017, 1:57 a.m. OK GNU C++14 TESTS 66 343 921600 2800
31696741 vjudge5 E Oct. 25, 2017, 1:53 a.m. OK GNU C++14 TESTS 66 343 921600 2800
40982797 ReaLNero1 E July 30, 2018, 6:34 p.m. OK GNU C++14 TESTS 66 358 921600 2800
24711096 Splashing E Feb. 16, 2017, 6:33 a.m. OK GNU C++14 TESTS 66 608 2867200 2800
23681301 jasonvictoryan E Jan. 10, 2017, 1:07 p.m. OK GNU C++14 TESTS 66 608 3174400 2800
24709645 Heart_BIue E Feb. 16, 2017, 4:57 a.m. OK GNU C++14 TESTS 66 624 2867200 2800
25536180 tfg E March 16, 2017, 1:17 a.m. OK GNU C++14 TESTS 66 733 52736000 2800
53526094 jslijin E April 29, 2019, 4:28 p.m. OK GNU C++14 TESTS 66 779 286208000 2800
53524969 jslijin E April 29, 2019, 4:18 p.m. OK GNU C++14 TESTS 66 779 286208000 2800
53524721 jslijin E April 29, 2019, 4:16 p.m. OK GNU C++14 TESTS 66 779 286412800 2800
47326614 Trisolaris E Dec. 21, 2018, 10:46 a.m. OK GNU C++17 TESTS 66 140 34406400 2800
47325164 Trisolaris E Dec. 21, 2018, 9:58 a.m. OK GNU C++17 TESTS 66 358 1228800 2800
43434312 mdj982 E Sept. 26, 2018, 4:08 a.m. OK GNU C++17 TESTS 66 951 67788800 2800
43434430 mdj982 E Sept. 26, 2018, 4:13 a.m. OK GNU C++17 TESTS 66 1060 135065600 2800
55986259 wythend E June 24, 2019, 3:55 a.m. OK GNU C++17 TESTS 66 1918 921600 2800
53238670 hjk1030 E April 24, 2019, 3:18 p.m. OK GNU C++17 TESTS 66 1965 921600 2800
44181662 lemelisk E Oct. 12, 2018, 11:34 a.m. OK GNU C++17 TESTS 66 1996 409600 2800
49809239 YouKn0wWho E Feb. 11, 2019, 10:20 p.m. OK GNU C++17 TESTS 66 2059 1843200 2800
42097989 Tosic E Aug. 25, 2018, 5:39 p.m. OK GNU C++17 TESTS 66 2105 819200 2800
52557519 Gene_Liu E April 10, 2019, 8:33 a.m. OK GNU C++17 TESTS 66 2136 716800 2800
23604232 qwerty787788 E Jan. 6, 2017, 4:17 p.m. OK Java 8 TESTS 66 1138 21196800 2800
23894823 JialinOuyang E Jan. 17, 2017, 5:12 a.m. OK Java 8 TESTS 66 1434 101171200 2800
23894993 JialinOuyang E Jan. 17, 2017, 5:29 a.m. OK Java 8 TESTS 66 1450 101171200 2800
23895102 JialinOuyang E Jan. 17, 2017, 5:40 a.m. OK Java 8 TESTS 66 1513 101171200 2800
23894937 JialinOuyang E Jan. 17, 2017, 5:23 a.m. OK Java 8 TESTS 66 1528 101171200 2800
23892730 JialinOuyang E Jan. 17, 2017, 1:36 a.m. OK Java 8 TESTS 66 1590 99430400 2800
23892556 JialinOuyang E Jan. 17, 2017, 1:18 a.m. OK Java 8 TESTS 66 1684 99430400 2800
35820734 alexrcoleman E March 1, 2018, 10:08 p.m. OK Java 8 TESTS 66 1981 246988800 2800
35747380 alexrcoleman E Feb. 26, 2018, 11:15 p.m. OK Java 8 TESTS 66 1996 247296000 2800
23673937 alexrcoleman E Jan. 10, 2017, 3:46 a.m. OK Java 8 TESTS 66 2012 247091200 2800
23650416 LLI_E_P_JI_O_K E Jan. 8, 2017, 5:44 p.m. OK MS C++ TESTS 66 2527 295321600 2800
26481769 RCG E April 18, 2017, 6 p.m. OK MS C++ TESTS 66 3899 2662400 2800
30499620 mrmezan1998 E Sept. 19, 2017, 1:39 p.m. OK MS C++ TESTS 66 4056 819200 2800
24026178 superwatermelon E Jan. 22, 2017, 8:26 a.m. OK MS C++ TESTS 66 4212 2764800 2800
24028494 HMAXS E Jan. 22, 2017, 10:44 a.m. OK MS C++ TESTS 66 4633 4096000 2800

remove filters

Back to search problems