Language: C++


#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
????????int paper[15][15] = {{0}};
????????int x,y,size;
????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
????????{
????????????????x+=2;
????????????????y+=2;
????????????????if(size==1)
????????????????{
????????????????????????paper[x][y]+=1;paper[x+1][y]+=1;paper[x-1][y]+=1;paper[x][y-1]+=1;paper[x][y+1]+=1;
????????????????}
????????????????if(size==2)
????????????????{
????????????????????????paper[x][y]+=1;paper[x-1][y+1]+=1;paper[x-1][y]+=1;paper[x-1][y-1]+=1;paper[x][y+1]+=1;paper[x][y-1]+=1;paper[x+1][y-1]+=1;paper[x+1][y]+=1;paper[x+1][y+1]+=1;
????????????????}
????????????????if(size==3)
????????????????{
????????????????????????paper[x][y]+=1;paper[x-1][y+1]+=1;paper[x-1][y]+=1;paper[x-1][y-1]+=1;paper[x][y+1]+=1;paper[x][y-1]+=1;paper[x+1][y-1]+=1;paper[x+1][y]+=1;paper[x+1][y+1]+=1;paper[x+2][y]+=1;paper[x-2][y]+=1;paper[x][y+2]+=1;paper[x][y-2]+=1;
????????????????}
????????}
????????int max=0,voi=0;
????????for(int i=2;i<=11;i++)
????????{
????????????????for(int j=2;j<=11;j++)
????????????????{
????????????????????????if(paper[i][j]>max)max=paper[i][j];
????????????????????????if(paper[i][j]==0)voi++;
????????????????}
????????}
????????cout<<voi<<endl<<max<<endl;
????????return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected primary-expression before '?' token
    7 | ????????int paper[15][15] = {{0}};
      | ^
a.cc:7:2: error: expected primary-expression before '?' token
    7 | ????????int paper[15][15] = {{0}};
      |  ^
a.cc:7:3: error: expected primary-expression before '?' token
    7 | ????????int paper[15][15] = {{0}};
      |   ^
a.cc:7:4: error: expected primary-expression before '?' token
    7 | ????????int paper[15][15] = {{0}};
      |    ^
a.cc:7:5: error: expected primary-expression before '?' token
    7 | ????????int paper[15][15] = {{0}};
      |     ^
a.cc:7:6: error: expected primary-expression before '?' token
    7 | ????????int paper[15][15] = {{0}};
      |      ^
a.cc:7:7: error: expected primary-expression before '?' token
    7 | ????????int paper[15][15] = {{0}};
      |       ^
a.cc:7:8: error: expected primary-expression before '?' token
    7 | ????????int paper[15][15] = {{0}};
      |        ^
a.cc:7:9: error: expected primary-expression before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
a.cc:7:9: error: expected ':' before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
      |         :
a.cc:7:9: error: expected primary-expression before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
a.cc:7:9: error: expected ':' before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
      |         :
a.cc:7:9: error: expected primary-expression before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
a.cc:7:9: error: expected ':' before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
      |         :
a.cc:7:9: error: expected primary-expression before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
a.cc:7:9: error: expected ':' before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
      |         :
a.cc:7:9: error: expected primary-expression before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
a.cc:7:9: error: expected ':' before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
      |         :
a.cc:7:9: error: expected primary-expression before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
a.cc:7:9: error: expected ':' before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
      |         :
a.cc:7:9: error: expected primary-expression before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
a.cc:7:9: error: expected ':' before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
      |         :
a.cc:7:9: error: expected primary-expression before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
a.cc:7:9: error: expected ':' before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
      |         :
a.cc:7:9: error: expected primary-expression before 'int'
    7 | ????????int paper[15][15] = {{0}};
      |         ^~~
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ????????int x,y,size;
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ????????int x,y,size;
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ????????int x,y,size;
      |   ^
a.cc:8:4: error: expected primary-expression before '?' token
    8 | ????????int x,y,size;
      |    ^
a.cc:8:5: error: expected primary-expression before '?' token
    8 | ????????int x,y,size;
      |     ^
a.cc:8:6: error: expected primary-expression before '?' token
    8 | ????????int x,y,size;
      |      ^
a.cc:8:7: error: expected primary-expression before '?' token
    8 | ????????int x,y,size;
      |       ^
a.cc:8:8: error: expected primary-expression before '?' token
    8 | ????????int x,y,size;
      |        ^
a.cc:8:9: error: expected primary-expression before 'int'
    8 | ????????int x,y,size;
      |         ^~~
a.cc:8:9: error: expected ':' before 'int'
    8 | ????????int x,y,size;
      |         ^~~
      |         :
a.cc:8:9: error: expected primary-expression before 'int'
    8 | ????????int x,y,size;
      |         ^~~
a.cc:8:9: error: expected ':' before 'int'
    8 | ????????int x,y,size;
      |         ^~~
      |         :
a.cc:8:9: error: expected primary-expression before 'int'
    8 | ????????int x,y,size;
      |         ^~~
a.cc:8:9: error: expected ':' before 'int'
    8 | ????????int x,y,size;
      |         ^~~
      |         :
a.cc:8:9: error: expected primary-expression before 'int'
    8 | ????????int x,y,size;
      |         ^~~
a.cc:8:9: error: expected ':' before 'int'
    8 | ????????int x,y,size;
      |         ^~~
      |         :
a.cc:8:9: error: expected primary-expression before 'int'
    8 | ????????int x,y,size;
      |         ^~~
a.cc:8:9: error: expected ':' before 'int'
    8 | ????????int x,y,size;
      |         ^~~
      |         :
a.cc:8:9: error: expected primary-expression before 'int'
    8 | ????????int x,y,size;
      |         ^~~
a.cc:8:9: error: expected ':' before 'int'
    8 | ????????int x,y,size;
      |         ^~~
      |         :
a.cc:8:9: error: expected primary-expression before 'int'
    8 | ????????int x,y,size;
      |         ^~~
a.cc:8:9: error: expected ':' before 'int'
    8 | ????????int x,y,size;
      |         ^~~
      |         :
a.cc:8:9: error: expected primary-expression before 'int'
    8 | ????????int x,y,size;
      |         ^~~
a.cc:8:9: error: expected ':' before 'int'
    8 | ????????int x,y,size;
      |         ^~~
      |         :
a.cc:8:9: error: expected primary-expression before 'int'
    8 | ????????int x,y,size;
      |         ^~~
a.cc:9:1: error: expected primary-expression before '?' token
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      | ^
a.cc:9:2: error: expected primary-expression before '?' token
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |  ^
a.cc:9:3: error: expected primary-expression before '?' token
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |   ^
a.cc:9:4: error: expected primary-expression before '?' token
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |    ^
a.cc:9:5: error: expected primary-expression before '?' token
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |     ^
a.cc:9:6: error: expected primary-expression before '?' token
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |      ^
a.cc:9:7: error: expected primary-expression before '?' token
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |       ^
a.cc:9:8: error: expected primary-expression before '?' token
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |        ^
a.cc:9:9: error: expected primary-expression before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
a.cc:9:9: error: expected ':' before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
      |         :
a.cc:9:9: error: expected primary-expression before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
a.cc:9:9: error: expected ':' before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
      |         :
a.cc:9:9: error: expected primary-expression before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
a.cc:9:9: error: expected ':' before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
      |         :
a.cc:9:9: error: expected primary-expression before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
a.cc:9:9: error: expected ':' before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
      |         :
a.cc:9:9: error: expected primary-expression before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
a.cc:9:9: error: expected ':' before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
      |         :
a.cc:9:9: error: expected primary-expression before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
a.cc:9:9: error: expected ':' before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
      |         :
a.cc:9:9: error: expected primary-expression before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
a.cc:9:9: error: expected ':' before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
      |         :
a.cc:9:9: error: expected primary-expression before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
a.cc:9:9: error: expected ':' before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
      |         :
a.cc:9:9: error: expected primary-expression before 'while'
    9 | ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
      |         ^~~~~
a.cc:26:1: error: expected primary-expression before '?' token
   26 | ????????int max=0,voi=0;
      | ^
a.cc:26:2: error: expected primary-expression before '?' token
   26 | ????????int max=0,voi=0;
      |  ^
a.cc:26:3: error: expected primary-expression before '?' token
   26 | ????????int max=0,voi=0;
      |   ^
a.cc:26:4: error: expected primary-expression before '?' token
   26 | ????????int max=0,voi=0;
      |    ^
a.cc:26:5: error: expected primary-expression before '?' token
   26 | ????????int max=0,voi=0;
      |     ^
a.cc:26:6: error: expected primary-expression before '?' token
   26 | ????????int max=0,voi=0;
      |      ^
a.cc:26:7: error: expected primary-expression before '?' token
   26 | ????????int max=0,voi=0;
      |       ^
a.cc:26:8: error: expected primary-expression before '?' token