import java.io.* ; import java.util.* ; public class rsi { static char[] b = new char[50] ; static int[] dat = new int[] { 11, 7, 21, 8, 31, 9, 12, 4, 22, 5, 32, 6, 13, 1, 23, 2, 33, 3, 14, 0, 24, 0 } ; static int dx[] = { 0, 0, -10, -1, 1, 10 } ; public static void main(String[] args) throws Exception { for (int i=0; i t+1) { best[nlf][nrf][nat] = t+1 ; q[qp++] = nlf ; q[qp++] = nrf ; q[qp++] = nat ; q[qp++] = t+1 ; } } } } } }