Submission #3245919
Source Code Expand
#include<stdio.h> #include<iostream> using namespace std; int main() { int xx, yy, n; int x[120], y[120], a[120]; while(~scanf("%d %d %d", &xx, &yy, &n)) { int i; int ans = 0; int x1 = 0, x2 = xx, y1 = 0, y2 = yy; for(i = 0; i < n; i++) { scanf("%d %d %d", &x[i], &y[i], &a[i]); if(a[i] == 1) x1 = max(x1, x[i]); if(a[i] == 2) x2 = min(x2, x[i]); if(a[i] == 3) y1 = max(y1, y[i]); if(a[i] == 4) y2 = min(y2, y[i]); } ans = (x2 - x1) * (y2 - y1); if((x1 >= x2) || (y1 >= y2)) ans = 0; printf("%d\n", ans); } }
Submission Info
Submission Time | |
---|---|
Task | B - Snuke's Coloring 2 (ABC Edit) |
User | vjudge4 |
Language | C (GCC 5.4.1) |
Score | 0 |
Code Size | 559 Byte |
Status | CE |
Compile Error
./Main.c:2:19: fatal error: iostream: No such file or directory compilation terminated.