Post by zerob13


/* * To change this template, choose Tools | Templates * and open the template in the editor. / import java.util.; /** * * @author Zerob13 */ class node{ int[][] state; int pre,tem; char dir; node() { int i,j,k=1; state=new int[3][3]; for(i=0;ib[i]) num++; } ret+=fac[i]*num; } tem=ret; return ret; } } public class Main { static char output(int q) { if(q1) return 'u'; if(q2) return 'd'; if(q3) return 'r'; if(q0) return 'l'; return 0; } public static void main(String[] args) { node[] queue=new node[362882]; byte[] hash=new byte[362882]; int[] sa=new int[362882]; int i,top,la,j,aaa,con; for(i=0;i=3||y>=3) continue; p.state[x][y]^=p.state[e][f]; p.state[e][f]^=p.state[x][y]; p.state[x][y]^=p.state[e][f]; tem=p.HASH(); if(hash[tem]==0) { p.pre=top; p.tem=tem; p.dir=output(i); hash[tem]=1; queue[la]=new node(); for(ii=0;ii