Problem 500

Problem description here

This turned out to be the most difficult problem, as solving a sudoku involves permutations and a lots of checks.
This problem is shortest in C++ due to its next_permutation() implementation.

Highlights

  • string r,z,solve(string q,int p=0)  definition of string and method at the same time
  • solve(string q,int p=0)  default parameter, to be used when calling the method recursively
  • int b[]={i/5,i%5,(i/5>1)+2*(i%5>1)} definition and initialization of an array