CCF 201409-2 画图
/*
创建100*100的数组,并用 0 初始化
将涂色区域赋值为 1,看有多少个 1
*/
#include <iostream>
#include <cstring>
using namespace std;
int a[100][100];
int main(){
memset(a, 0, sizeof(a));
int n;
cin >> n;
int x1, y1, x2, y2, i, j;
while(n--){
cin >> x1 >> y1 >> x2 >> y2;
for(i=x1; i<x2; i++){
for(j=y1; j<y2; j++){
a[i][j]=1;
}
}
}
int ans = 0;
for(i=0; i<100; i++){
for(j=0; j<100; j++){
ans+=a[i][j];
}
}
cout << ans << endl;
return 0;
}