| 91 | //public long tottime = 0; |
| 92 | |
| 93 | void search(boolean rot) { |
| 94 | solution = ""; |
| 95 | //long time = System.currentTimeMillis(); |
| 96 | int ud = new Center1(c.getCenter(), 0).getsym(); |
| 97 | int fb = new Center1(c.getCenter(), 1).getsym(); |
| 98 | int rl = new Center1(c.getCenter(), 2).getsym(); |
| 99 | int udprun = csprun[ud >> 6]; |
| 100 | int fbprun = csprun[fb >> 6]; |
| 101 | int rlprun = csprun[rl >> 6]; |
| 102 | |
| 103 | p1SolsCnt = 0; |
| 104 | arr2idx = 0; |
| 105 | p1sols.clear(); |
| 106 | |
| 107 | for (length1=Math.min(Math.min(udprun, fbprun), rlprun); length1<100; length1++) { |
| 108 | if (rlprun <= length1 && search1(rl>>>6, rl&0x3f, length1, -1, 0) |
| 109 | || udprun <= length1 && search1(ud>>>6, ud&0x3f, length1, -1, 0) |
| 110 | || fbprun <= length1 && search1(fb>>>6, fb&0x3f, length1, -1, 0)) { |
| 111 | break; |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | FullCube[] p1SolsArr = p1sols.toArray(new FullCube[0]); |
| 116 | Arrays.sort(p1SolsArr, 0, p1SolsArr.length); |
| 117 | |
| 118 | int MAX_LENGTH2 = 9; |
| 119 | int length12; |
| 120 | do { |
| 121 | OUT: |
| 122 | for (length12=p1SolsArr[0].value; length12<100; length12++) { |
| 123 | for (int i=0; i<p1SolsArr.length; i++) { |
| 124 | if (p1SolsArr[i].value > length12) { |
| 125 | break; |
| 126 | } |
| 127 | if (length12 - p1SolsArr[i].length1 > MAX_LENGTH2) { |
| 128 | continue; |
| 129 | } |
| 130 | c1.copy(p1SolsArr[i]); |
| 131 | ct2.set(c1.getCenter(), c1.getEdge().getParity()); |
| 132 | int s2ct = ct2.getct(); |
| 133 | int s2rl = ct2.getrl(); |
| 134 | length1 = p1SolsArr[i].length1; |
| 135 | length2 = length12 - p1SolsArr[i].length1; |
| 136 | |
| 137 | if (search2(s2ct, s2rl, length2, 28, 0)) { |
| 138 | break OUT; |
| 139 | } |
| 140 | } |
| 141 | } |
| 142 | MAX_LENGTH2++; |
| 143 | } while (length12 == 100); |
| 144 | |
| 145 | Arrays.sort(arr2, 0, arr2idx); |
| 146 | int length123, index = 0; |
| 147 | // int solcnt = 0; |
| 148 | |
| 149 | int MAX_LENGTH3 = 13; |
| 150 | do { |