| 213 | } |
| 214 | |
| 215 | private static int cornmv2(int c, int po, int f) { |
| 216 | int[] n = new int[6], s = new int[4]; |
| 217 | s[0] = po % 2; s[1] = 1 - s[0]; |
| 218 | s[2] = po / 3; s[3] = po % 3; |
| 219 | int t, q = 2; |
| 220 | for (t = 5; t >= 0; t--) { |
| 221 | if (c >= Utils.Cnk[t][q]) { |
| 222 | c -= Utils.Cnk[t][q--]; |
| 223 | n[t] = s[q] << 3 | s[q + 2]; |
| 224 | } else n[t] = -3; |
| 225 | } |
| 226 | switch (f) { |
| 227 | case 0: //U |
| 228 | Utils.circle(n, 0, 3, 2, 1); |
| 229 | break; |
| 230 | case 1: //r |
| 231 | case 2: //R |
| 232 | Utils.circle(n, 1, 2, 4, 5, new int[] {1, 2, 1, 2}); |
| 233 | //n[1]++; n[2] += 2; n[4]++; n[5] += 2; |
| 234 | break; |
| 235 | } |
| 236 | c = 0; q = 2; |
| 237 | for (t = 5; t >= 0; t--) { |
| 238 | if (n[t] >= 0) { |
| 239 | c += Utils.Cnk[t][q--]; |
| 240 | s[q] = n[t] >> 3; |
| 241 | s[q + 2] = (n[t] & 7) % 3; |
| 242 | } |
| 243 | } |
| 244 | return (c * 2 + s[0]) * 9 + (s[2] * 3 + s[3]); |
| 245 | } |
| 246 | |
| 247 | private static boolean idaRoux1(int cp, int co, int ep, int eo, int depth, int lm) { |
| 248 | if (depth == 0) return cp == 50 && co == 225 && ep == 72 && eo == 96; |