#include <iostream>

using namespace std;

int main() {
    int arr[100][100] = {0,};
    int n;
    int c;
    int b;
    int cnt = 0;
    cin >> n;
    for(int i = 0;i <n;i++){
        cin >> c >> b;
        for (int j = b;j < b+10;j++ ) {
            for (int k = c;k < c+10;k++ ) {
                arr[j][k] = 1;
            }
        }
    }
    for (int i = 0;i < 100 ;i++ ) {
        for (int j = 0;j < 100 ;j++ ) {
            cnt += arr[i][j];
        }
    }
    cout << cnt;
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: