(int[] n, int[] s, int c, int o)
| 106 | } |
| 107 | |
| 108 | private static void idxToComb(int[] n, int[] s, int c, int o) { |
| 109 | int q = 2; |
| 110 | for (int t = 0; t < 6; t++) |
| 111 | if (c >= Utils.Cnk[5 - t][q]) { |
| 112 | c -= Utils.Cnk[5 - t][q--]; |
| 113 | n[t] = s[q] << 1 | o & 1; |
| 114 | o >>= 1; |
| 115 | } else n[t] = -1; |
| 116 | } |
| 117 | |
| 118 | private static boolean search(int p, int f, int t, int solvedp, int d, int lm) { |
| 119 | if (d == 0) return p == solvedp && f == solvedp * 2 && t == 0; |