Submission #2707715
Source Code Expand
import numpy as np w,h,n=map(int,raw_input().split()) mp = np.zeros((w,h)) for i in range(n): xi,yi,ai=map(int,raw_input().split()) if ai==1: # x < xi mp[:xi,:] = 1 elif ai==2: # x > xi mp[xi:,:] = 1 elif ai==3: # y < yi mp[:,:yi] = 1 elif ai==4: # y > yi mp[:,yi:] = 1 print w*h - np.sum(mp)
Submission Info
Submission Time | |
---|---|
Task | B - Snuke's Coloring 2 (ABC Edit) |
User | naoya_t |
Language | Python (2.7.6) |
Score | 200 |
Code Size | 333 Byte |
Status | AC |
Exec Time | 253 ms |
Memory | 19308 KB |
Judge Result
Set Name | sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | dir_01.txt, dir_02.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, sample_01.txt, sample_02.txt, sample_03.txt, small_01.txt, small_02.txt, small_03.txt, small_04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
dir_01.txt | AC | 253 ms | 19308 KB |
dir_02.txt | AC | 92 ms | 10540 KB |
random_01.txt | AC | 92 ms | 10540 KB |
random_02.txt | AC | 92 ms | 10540 KB |
random_03.txt | AC | 94 ms | 10540 KB |
random_04.txt | AC | 92 ms | 10540 KB |
sample_01.txt | AC | 91 ms | 10416 KB |
sample_02.txt | AC | 91 ms | 10416 KB |
sample_03.txt | AC | 92 ms | 10416 KB |
small_01.txt | AC | 90 ms | 10416 KB |
small_02.txt | AC | 92 ms | 10416 KB |
small_03.txt | AC | 91 ms | 10540 KB |
small_04.txt | AC | 92 ms | 10540 KB |