Print solution
| 328 | |
| 329 | /// Print solution |
| 330 | virtual void |
| 331 | print(std::ostream& os) const { |
| 332 | os << '\t'; |
| 333 | for (int i = 0; i<n*n*n*n; i++) { |
| 334 | for (int j=0; j<n*n; j++) { |
| 335 | if (y[j].contains(i+1)) { |
| 336 | if (j+1<10) |
| 337 | os << j+1 << " "; |
| 338 | else |
| 339 | os << (char)(j+1+'A'-10) << " "; |
| 340 | break; |
| 341 | } |
| 342 | } |
| 343 | if((i+1)%(n*n) == 0) |
| 344 | os << std::endl << '\t'; |
| 345 | } |
| 346 | os << std::endl; |
| 347 | } |
| 348 | }; |
| 349 | |
| 350 |