#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int x, y;
int cnt = 0;
int arrnr[100][100] = {0,};
for (int i = 0;i < n;i++) {
cin >> x >> y;
for (int j = x;j < 10+x;j++){
for (int k =y;k < 10+y;k++){
arrnr[j][k] = 1;
}
}
}
for (int i = 0;i < 100 ;i++ ) {
for (int j = 0;j < 100 ;j++ ) {
cnt += arrnr[i][j];
}
}
cout << cnt;
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: