模拟扫一遍数组
#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int q[N][N], n, x_0, y_0, x_1, y_1, res;
int main()
{
cin >> n;
for (int i = 0; i < n; i ++)
{
cin >> x_0 >> y_0 >> x_1 >> y_1;
for (int i = x_0; i < x_1; i ++)
for (int j = y_0; j < y_1; j ++)
q[i][j] = 1;
}
for(int i = 0; i <= 100; i ++)
for (int j = 0; j <= 100; j ++)
res += q[i][j];
cout << res << endl;
return 0;
}