/**
 * name	     :
 * matric no.:
 */
 
import java.util.*;

class Grid {

    // declare the member field

    // declare the constructor

	/**
	 *	   processBomb   : a new bomb placed at cell (x, y) and radius r. Update the necessary information for
     *					   each affected cell
	 *	   Pre-condition :
	 *	   Post-condition:
	 */	
	public void processBomb(int x, int y, int r) {
		// implementation
	}
	
	
	/**
	 *	   getDestroyed   : to count the number of destroyed buildings
	 *	   Pre-condition  :
	 *	   Post-condition :
	 */
	public int getDestroyed() {
		// implementation
	}

	
	/**
	 *	   count	      : to count the number of bombs that affects cell (x, y)
	 *	   Pre-condition  :
	 *	   Post-condition :
	 */
	public int count(int x, int y) {
		// implementation
	}

	
	/**
	 *	   getPerimeter   : to determine the perimeter of the destroyed buildings
	 *	   Pre-condition  :
	 *	   Post-condition :
	 */	
	public int getPerimeter() {
		// implementation
	}

}

class Bomb {

	public static void main(String[] args) {

		// declare the necessary variables

		// create new object from class Grid

		// declare a Scanner object to read input

		// read input and process them accordingly
	}
}

