added explicit Long.valueOf
SolverIDDFS: speedup using lastRobo/lastDirReverse check