| 220 | } |
| 221 | |
| 222 | private static String move2string() { |
| 223 | StringBuilder sb = new StringBuilder("\n\nttm: "); |
| 224 | int top = 0, bottom = 0; |
| 225 | for (int i = 0; i < sollen; i++) { |
| 226 | int val = sol[i]; |
| 227 | if (val > 0) { |
| 228 | top = (val > 6) ? (val - 12) : val; |
| 229 | } else if (val < 0) { |
| 230 | bottom = (val < -6) ? (-12 - val) : -val; |
| 231 | } else { |
| 232 | if (top == 0 && bottom == 0) { |
| 233 | sb.append(" / "); |
| 234 | } else { |
| 235 | sb.append('(').append(top).append(',').append(bottom).append(") / "); |
| 236 | } |
| 237 | top = bottom = 0; |
| 238 | } |
| 239 | } |
| 240 | if (top != 0 || bottom != 0) { |
| 241 | sb.append('(').append(top).append(",").append(bottom).append(")"); |
| 242 | } |
| 243 | return sb.toString(); |
| 244 | } |
| 245 | |
| 246 | public static String solve(int type, String scr) { |
| 247 | if (type == 0) return ""; |