2025-06-05 20:45:47 +09:00

24 lines
416 B
C

#include <stdio.h>
int main(){
int paper[100][100]={0,};
int n, x, y, sum=0;
scanf("%d",&n);
while(n--){
scanf("%d %d",&x, &y);
for(int i=x-1; i<x+9; i++){
for(int j=y-1; j<y+9; j++){
if(paper[i][j]!=1){
sum++;
paper[i][j]=1;
}
}
}
}
printf("%d",sum);
return 0;
}