Submission #1836559
Source Code Expand
W, H, N = map(int, input().split()) X = [0, W] Y = [0, W] for _ in range(N): x, y, a = map(int, input().split()) if a == 1: X[0] = max(x, X[0]) elif a == 2: X[1] = min(x, X[1]) elif a == 3: Y[0] = max(y, Y[0]) else: Y[1] = min(y, Y[1]) x = X[1] - X[0] y = Y[1] - Y[0] if x < 0: x = 0 if y < 0: y = 0 print(x*y)
Submission Info
Submission Time | |
---|---|
Task | B - Snuke's Coloring 2 (ABC Edit) |
User | pytry3g |
Language | Python (3.4.3) |
Score | 200 |
Code Size | 391 Byte |
Status | AC |
Exec Time | 18 ms |
Memory | 3064 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 | 18 ms | 3064 KB |
dir_02.txt | AC | 18 ms | 3064 KB |
random_01.txt | AC | 18 ms | 3064 KB |
random_02.txt | AC | 18 ms | 3064 KB |
random_03.txt | AC | 18 ms | 3064 KB |
random_04.txt | AC | 18 ms | 3064 KB |
sample_01.txt | AC | 17 ms | 3064 KB |
sample_02.txt | AC | 17 ms | 3064 KB |
sample_03.txt | AC | 17 ms | 3064 KB |
small_01.txt | AC | 18 ms | 3064 KB |
small_02.txt | AC | 18 ms | 3064 KB |
small_03.txt | AC | 18 ms | 3064 KB |
small_04.txt | AC | 18 ms | 3064 KB |