Submission #62273982
Source Code Expand
Copy
N,M=map(int,input().split())s=[]for i in range(N):S=input()s.append(S)t=[]for i in range(M):T=input()t.append(T)for i in range(N-M+1):for j in range(N-M+1):flag=Truefor k in range(i,i+M):for l in range(j,j+M):if s[k][l]!=t[k-i][l-j]:flag=Falseif flag:print(i+1,j+1)
N,M=map(int,input().split()) s=[] for i in range(N): S=input() s.append(S) t=[] for i in range(M): T=input() t.append(T) for i in range(N-M+1): for j in range(N-M+1): flag=True for k in range(i,i+M): for l in range(j,j+M): if s[k][l]!=t[k-i][l-j]: flag=False if flag: print(i+1,j+1)
Submission Info
Submission Time | |
---|---|
Task | B - Seek Grid |
User | HappyCoder |
Language | Python (PyPy 3.10-v7.3.12) |
Score | 200 |
Code Size | 417 Byte |
Status | AC |
Exec Time | 77 ms |
Memory | 81996 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_01.txt, 00_sample_02.txt |
All | 00_sample_01.txt, 00_sample_02.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | AC | 63 ms | 76508 KB |
00_sample_02.txt | AC | 63 ms | 76296 KB |
01_random_01.txt | AC | 74 ms | 81356 KB |
01_random_02.txt | AC | 73 ms | 81780 KB |
01_random_03.txt | AC | 69 ms | 81488 KB |
01_random_04.txt | AC | 71 ms | 81652 KB |
01_random_05.txt | AC | 69 ms | 81456 KB |
01_random_06.txt | AC | 75 ms | 81996 KB |
01_random_07.txt | AC | 72 ms | 81560 KB |
01_random_08.txt | AC | 76 ms | 81836 KB |
01_random_09.txt | AC | 68 ms | 81584 KB |
01_random_10.txt | AC | 74 ms | 81260 KB |
01_random_11.txt | AC | 69 ms | 81364 KB |
01_random_12.txt | AC | 75 ms | 81496 KB |
01_random_13.txt | AC | 74 ms | 81684 KB |
01_random_14.txt | AC | 77 ms | 81704 KB |
01_random_15.txt | AC | 75 ms | 81280 KB |
01_random_16.txt | AC | 72 ms | 81792 KB |
01_random_17.txt | AC | 68 ms | 81556 KB |
01_random_18.txt | AC | 75 ms | 81988 KB |
01_random_19.txt | AC | 76 ms | 81480 KB |
01_random_20.txt | AC | 76 ms | 81716 KB |
02_handmade_01.txt | AC | 61 ms | 76704 KB |
02_handmade_02.txt | AC | 62 ms | 76264 KB |
02_handmade_03.txt | AC | 62 ms | 76676 KB |
02_handmade_04.txt | AC | 64 ms | 80964 KB |