import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.TreeSet; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author durec4 */ public class SIP { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); TreeSet cs = new TreeSet(); Integer actPos; public static void main(String[] args) throws Exception{ SIP s = new SIP(); while(s.run()){} } int getInt(String s) throws Exception{ return new Integer(s); } int[] getInts(int cnt, String[] a){ int[] arr = new int[cnt]; for(int i = 0;i{ int x; int y; public Coords(int x, int y) { this.x = x; this.y = y; } void incUp(){ this.y++; } void incDown(){ this.y--; } void incRight(){ this.x++; } void incLeft(){ this.x--; } @Override public int compareTo(Object ob) { Coords o = (Coords)ob; if(this.x == o.x && this.y == o.y){ return 0; } return 1; } @Override public String toString(){ return "[" + x +", " + y + "]"; } } }