Submission #2708224


Source Code Expand

W,H,N = (int(i) for i in input().split())

upright = [W,H]
downleft = [0,0]

for i in range(N):
    x,y,a = (int(k) for k in input().split())
    if a == 1:
        if x > downleft[0]:
            downleft[0] = x
    elif a == 2:
        if x < upright[0]:
            upright[0] = x
    elif a == 3:
        if x > downleft[1]:
            downleft[1] = y
    else:
        if x < upright[1]:
            upright[1] = y

area = (upright[1]-downleft[1])*(upright[0]-downleft[0])

if area <= 0:
    print(0)
else:
    print(area)

Submission Info

Submission Time
Task B - Snuke's Coloring 2 (ABC Edit)
User carolinaus
Language Python (3.4.3)
Score 0
Code Size 553 Byte
Status WA
Exec Time 18 ms
Memory 3064 KB

Judge Result

Set Name sample All
Score / Max Score 0 / 0 0 / 200
Status
AC × 3
AC × 10
WA × 3
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 WA 17 ms 3064 KB
random_01.txt WA 18 ms 3064 KB
random_02.txt WA 18 ms 3064 KB
random_03.txt AC 17 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 17 ms 3064 KB
small_02.txt AC 17 ms 3064 KB
small_03.txt AC 17 ms 3064 KB
small_04.txt AC 17 ms 3064 KB