文章
43
粉丝
180
获赞
21
访问
196.1k
#include <iostream>
using namespace std;
const int N = 110;
int n, a, b, c, d;
int main()
{
while (cin >> n)
{
int cnt = 0;
bool pic[N][N] = {false};
for (int k = 0; k < n; k ++ )
{
cin >> a >> b >> c >> d;
for (int i = a; i < c; i ++ )
for (int j = b; j < d; j ++ )
pic[i][j] = true;
}
for (int i = 0; i <= 100; i ++ )
for (int j = 0; j <= 100; j ++ )
if (pic[i][j]) cnt ++;
cout << cnt << endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发