Submission #3230782
Source Code Expand
ai_ = lambda: [int(x)-1 for x in input().split()] ai = lambda: list(map(int, input().split())) h,w,n = ai() bl = [ai_() for _ in range(n)] from collections import defaultdict d = defaultdict(int) from itertools import product for a,b in bl: for da,db in product((-1,0,1), repeat=2): print(a+da,b+db) if 0 < a+da < h-1 and 0 < b+db < w-1: d[(a+da, b+db)] += 1 print((h-2)*(w-2) - len(d)) l = list(d.values()) for i in range(1, 10): print(l.count(i))
Submission Info
Submission Time | |
---|---|
Task | D - Snuke's Coloring |
User | krswrb |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 507 Byte |
Status | WA |
Exec Time | 3164 ms |
Memory | 210068 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | WA | 2206 ms | 39224 KB |
02.txt | WA | 2913 ms | 131348 KB |
03.txt | WA | 556 ms | 15848 KB |
04.txt | WA | 20 ms | 3316 KB |
05.txt | WA | 2065 ms | 72292 KB |
06.txt | WA | 2188 ms | 72720 KB |
07.txt | TLE | 3164 ms | 202036 KB |
08.txt | TLE | 3161 ms | 209384 KB |
09.txt | TLE | 3164 ms | 210068 KB |
10.txt | WA | 21 ms | 3316 KB |
11.txt | WA | 2934 ms | 139788 KB |
12.txt | TLE | 3164 ms | 203776 KB |
13.txt | WA | 29 ms | 3696 KB |
14.txt | WA | 2979 ms | 199652 KB |
15.txt | WA | 2861 ms | 146452 KB |
empty.txt | AC | 20 ms | 3316 KB |
sample_01.txt | WA | 20 ms | 3316 KB |
sample_02.txt | WA | 20 ms | 3316 KB |
sample_03.txt | AC | 20 ms | 3316 KB |