HELP — LightOJ 1397(Sudoku Solver),backtracking with pruning

Revision en2, by border, 2018-08-28 00:14:22

Problem Link: Sudoku Solver

My code: link

Pretty straightforward problem. I tried sorting the blank points on the basis of options for a point. I also tried with simple backtracking. In both cases I got TLE.

What am I missing here?

Also, is there any way to use bits to mask which number is possible for a place(row/column/box)?

Tags #backtracking, #sudoku, lightoj

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English border 2018-08-28 00:14:22 8
en1 English border 2018-08-28 00:13:27 485 Initial revision (published)