#include <stdio.h>

int main() {
    int paper[100][100]={0};
    int t,total=0;
    scanf("%d",&t);
    //반복횟수
    while(t--) {
        시작위치
        int i,j;
        scanf("%d %d",&i, &j);
        for (int m=i; m<10+i; m++) {
            for (int n=j; n<j+10; n++) {
                //색칠안된곳 1로 바꾸기, 넓이 1추가
                if(paper[m-1][n-1]==0) {
                    paper[m-1][n-1]=1;
                    total+=1;
                }
            }
        }
    }
    printf("%d",total);
    return 0;
}

Embed on website

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