Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

C++: #include<iostream>

using namespace std;


main(){
  
  int map[10][10];
  int x,y,size;
  //initialize
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      map[i][j]=0;
    }
  }
  int white=0,Max=0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    
    if(size==1){
      if(x>=0&&x<10&&(y-1)>=0&&(y-1)<10)map[x][y-1]++;    
      if((x-1)>=0&&(x-1)<10&&y>=0&&y<10)map[x-1][y]++;
	 if(x>=0&&x<10&&y>=0&&y<10)map[x][y]++;
	    if((x+1)>=0 &&(x+1)<10&&y>=0&&y<10)map[x+1][y]++;
	       if(x>=0&&x<10&&(y+1)>=0&&(y+1)<10)map[x][y+1]++;
		  
    }
    if(size==2){
      
      if(x-1>=0&&x-1<10&&(y-1)>=0&&(y-1)<10)map[x-1][y-1]++;
      if(x+1>=0&&x+1<10&&(y-1)>=0&&(y-1)<10)map[x+1][y-1]++;
      
      if(x-1>=0&&x-1<10&&(y+1)>=0&&(y+1)<10)map[x-1][y+1]++;
      if(x+1>=0&&x+1<10&&(y+1)>=0&&(y+1)<10)map[x+1][y+1]++;
       if(x>=0&&x<10&&(y-1)>=0&&(y-1)<10)map[x][y-1]++;    
      if((x-1)>=0&&(x-1)<10&&y>=0&&y<10)map[x-1][y]++;
	 if(x>=0&&x<10&&y>=0&&y<10)map[x][y]++;
	    if((x+1)>=0 &&(x+1)<10&&y>=0&&y<10)map[x+1][y]++;
	       if(x>=0&&x<10&&(y+1)>=0&&(y+1)<10)map[x][y+1]++;


    }
    if(size==3){                     if(x>=0&&x<10&&(y-2)>=0&&(y-2)<10) map[x][y-2]++;
                     
       if(x-2>=0&&x-2<10&&(y)>=0&&(y)<10)map[x-2][y]++; if(x+2>=0&&x+2<10&&(y)>=0&&(y)<10)  map[x+2][y]++;
                      
                                     if(x>=0&&x<10&&(y+2)>=0&&(y+2)<10)  map[x][y+2]++;
					  if(x-1>=0&&x-1<10&&(y-1)>=0&&(y-1)<10)map[x-1][y-1]++;
      if(x+1>=0&&x+1<10&&(y-1)>=0&&(y-1)<10)map[x+1][y-1]++;
      
      if(x-1>=0&&x-1<10&&(y+1)>=0&&(y+1)<10)map[x-1][y+1]++;
      if(x+1>=0&&x+1<10&&(y+1)>=0&&(y+1)<10)map[x+1][y+1]++;
       if(x>=0&&x<10&&(y-1)>=0&&(y-1)<10)map[x][y-1]++;    
      if((x-1)>=0&&(x-1)<10&&y>=0&&y<10)map[x-1][y]++;
	 if(x>=0&&x<10&&y>=0&&y<10)map[x][y]++;
	    if((x+1)>=0 &&(x+1)<10&&y>=0&&y<10)map[x+1][y]++;
	       if(x>=0&&x<10&&(y+1)>=0&&(y+1)<10)map[x][y+1]++;
					
    }
    
    
  }

    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
	if(map[i][j]==0)white++;
	if(map[i][j]>=Max)Max=map[i][j];
      }
      
    }
  cout << white<<" "<< Max << endl;

  return 0;
}

C++: #include <iostream>

using namespace std;

class Field{
private:
	int v[14][14]; //only 2-11 will be used.
public:
	Field(){
		int i, j;
		for(i=0;i<14;i++){
			for(j=0;j<14;j++){
				v[i][j] = 0;
			}
		}
	}

	void Drop(int x, int y, int s){
		x += 2;
		y += 2;

		if(s == 1){
			v[x][y]++; v[x-1][y]++; v[x+1][y]++; v[x][y-1]++; v[x][y+1]++;
		}else if(s == 2){
			int i, j;
			for(i=x-1;i<=x+1;i++){
				for(j=y-1;j<=y+1;j++){
					v[i][j]++;
				}
			}
		}else{
			int i, j;
			for(i=x-1;i<=x+1;i++){
				for(j=y-1;j<=y+1;j++){
					v[i][j]++;
				}
			}
			v[x-2][y]++; v[x+2][y]++; v[x][y-2]++; v[x][y+2]++;
		}
	}

	void printResult(){
		int i, j;
		int num = 0;
		int max = 0;

		for(i=2;i<=11;i++){
			for(j=2;j<=11;j++){
				if(v[i][j] == 0){
					num++;
				}
				if(max < v[i][j]){
					max = v[i][j];
				}
			}
		}
		cout << num << endl;
		cout << max << endl;
	}
};

int main(void){
	Field field;
	int x, y ,size;

	while(cin >> x){
		cin.ignore();
		cin >> y;
		cin.ignore();
		cin >> size;
		field.Drop(x, y, size);
	}

	field.printResult();
	return 0;
}

C++: #include <iostream>
#include <string>
#include <cstring>
#include <vector>

using namespace std;

int main() {
    vector<vector<int>> paper(10, vector<int>(10));
    while (true) {
        string str;
        getline(cin, str);
        if (str.empty())break;

        char c[10];
        for (int i = 0; i < str.size(); i++)c[i] = str[i];
        int x = stoi(strtok(c, ","));
        int y = stoi(strtok(NULL, ","));
        int s = stoi(strtok(NULL, ","));

        switch (s) {
            case 1: {
                for (int i = 0; i < 10; i++) {
                    for (int j = 0; j < 10; j++) {
                        if (abs(x - i) + abs(y - j) <= 1)paper[i][j]++;
                    }
                }
                break;
            }
            case 2: {
                for (int i = -1; i <= 1; i++) {
                    for (int j = -1; j <= 1; j++) {
                        int nx = x + i, ny = y + j;
                        if (0 <= nx && nx < 10 && 0 <= ny && ny < 10)paper[nx][ny]++;
                    }
                }
                break;
            }
            case 3: {
                for (int i = 0; i < 10; i++) {
                    for (int j = 0; j < 10; j++) {
                        if (abs(x - i) + abs(y - j) <= 2)paper[i][j]++;
                    }
                }
                break;
            }
        }
    }

    int zero = 0, strong = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (paper[i][j] == 0)zero++;
            strong = max(strong, paper[i][j]);
        }
    }
    cout << zero << endl << strong << endl;
    return 0;
}