Submission #1857200


Source Code Expand

#include <iostream>

using namespace std;

int W, H, N;

int main(void)
{
	cin >> W >> H >> N;
	
	int x, y, a;
	int lx = 0, ux = W, ly = 0, uy = H;
	for(int i = 0; i < N; i++){
		cin >> x >> y >> a;
		if(a == 1) lx = max(lx, x);
		if(a == 2) ux = min(ux, x);
		if(a == 3) ly = max(ly, y);
		if(a == 4) uy = min(uy, y);
	}
	
	cout << (ux - lx) * (uy - ly) << endl;
	return 0;
}

Submission Info

Submission Time
Task B - Snuke's Coloring 2 (ABC Edit)
User leaf1415
Language C++14 (GCC 5.4.1)
Score 0
Code Size 398 Byte
Status WA
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name sample All
Score / Max Score 0 / 0 0 / 200
Status
AC × 2
WA × 1
AC × 11
WA × 2
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 1 ms 256 KB
dir_02.txt AC 1 ms 256 KB
random_01.txt WA 1 ms 256 KB
random_02.txt AC 1 ms 256 KB
random_03.txt AC 1 ms 256 KB
random_04.txt AC 1 ms 256 KB
sample_01.txt AC 1 ms 256 KB
sample_02.txt WA 1 ms 256 KB
sample_03.txt AC 1 ms 256 KB
small_01.txt AC 1 ms 256 KB
small_02.txt AC 1 ms 256 KB
small_03.txt AC 1 ms 256 KB
small_04.txt AC 1 ms 256 KB