Submission #4173116
Source Code Expand
h,w=map(int,input().split()) from collections import defaultdict data=defaultdict(int) for y in range(h): line=input() for x in range(w): if line[x]=='.':data[(y,x)]=-1 if line[x]=='#': for i in range(-1,2): for j in range(-1,2): if data[(y+i,x+j)]!=-1: data[(y+i,x+j)]+=1 ans=0 for y in range(h): for x in range(w): if data[(y,x)]==0:ans+=1 if ans==0:print('Yes') elif ans>0:print('No')
Submission Info
Submission Time | |
---|---|
Task | C - Grid Repainting 2 |
User | gratan |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 524 Byte |
Status | WA |
Exec Time | 37 ms |
Memory | 3700 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | in01.txt, in02.txt, in03.txt, in04.txt, in05.txt, in06.txt, in07.txt, in08.txt, in09.txt, in10.txt, sample_01.txt, sample_02.txt, sample_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in01.txt | AC | 37 ms | 3572 KB |
in02.txt | AC | 36 ms | 3572 KB |
in03.txt | AC | 23 ms | 3572 KB |
in04.txt | AC | 23 ms | 3572 KB |
in05.txt | WA | 36 ms | 3700 KB |
in06.txt | AC | 36 ms | 3700 KB |
in07.txt | WA | 35 ms | 3572 KB |
in08.txt | AC | 35 ms | 3700 KB |
in09.txt | AC | 30 ms | 3572 KB |
in10.txt | AC | 28 ms | 3700 KB |
sample_01.txt | AC | 21 ms | 3316 KB |
sample_02.txt | WA | 21 ms | 3316 KB |
sample_03.txt | AC | 22 ms | 3316 KB |