import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.Scanner; import java.util.logging.Level; import java.util.logging.Logger; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author cteam037 */ public class Monsters { int counter = 0; //int[] t; int[] c; int n = 0; void run() { //Scanner sc = new Scanner(System.in); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { n = sc.nextInt(); //t = new int[n]; c = new int[n]; /*String line = br.readLine(); for (int i = 0; i < n-1; i++) { int spaceindex = line.indexOf(" "); c[i] = Integer.parseInt(line.substring(0,spaceindex))-1; line = line.substring(spaceindex+1); } c[n-1]=Integer.parseInt(line.trim())-1;*/ for(int i = 0;i