Submission #1992367
Source Code Expand
from collections import Counter h, w, n = map(int, input().split()) c = [] for k in range(n): i, j = map(lambda x: int(x) - 1,input().split()) for l in range(3): for m in range(3): p = i - l o = j - m if p < 0 or p > h - 3: continue if o < 0 or o > w - 3: continue c.append((p, o)) c = Counter(Counter(c).values()) print((h - 2) * (w - 2) - sum(c.values())) for i in range(1, 10): print(c[i])
Submission Info
Submission Time | |
---|---|
Task | D - Snuke's Coloring |
User | peace_of_junk |
Language | PyPy3 (2.4.0) |
Score | 400 |
Code Size | 490 Byte |
Status | AC |
Exec Time | 1038 ms |
Memory | 155076 KB |
Judge Result
Set Name | Sample | All | ||
---|---|---|---|---|
Score / Max Score | 0 / 0 | 400 / 400 | ||
Status | AC |
|
Set Name | Test Cases |
---|---|
Sample | |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, empty.txt, sample_01.txt, sample_02.txt, sample_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 846 ms | 129612 KB |
02.txt | AC | 893 ms | 129796 KB |
03.txt | AC | 385 ms | 67532 KB |
04.txt | AC | 161 ms | 38256 KB |
05.txt | AC | 689 ms | 102488 KB |
06.txt | AC | 664 ms | 100568 KB |
07.txt | AC | 1033 ms | 155076 KB |
08.txt | AC | 1001 ms | 153796 KB |
09.txt | AC | 1005 ms | 153796 KB |
10.txt | AC | 162 ms | 38256 KB |
11.txt | AC | 881 ms | 128644 KB |
12.txt | AC | 1026 ms | 152772 KB |
13.txt | AC | 187 ms | 39536 KB |
14.txt | AC | 1038 ms | 153796 KB |
15.txt | AC | 893 ms | 129796 KB |
empty.txt | AC | 162 ms | 38256 KB |
sample_01.txt | AC | 167 ms | 38256 KB |
sample_02.txt | AC | 164 ms | 38256 KB |
sample_03.txt | AC | 161 ms | 38256 KB |