Alx09

Untitled

Apr 2nd, 2020
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. void Back() {
  2. int k = 1, isS, isV;
  3. Init(k);
  4. while (k > 0) {
  5. isS = 0; isV = 0;
  6. if (k <= n)
  7. do {
  8. isS = Succesor(k);
  9. if (isS) isV = Valid(k);
  10. } while (isS && !isV);
  11. if (isS)
  12. if (Solution(k))
  13. Print();
  14. else {
  15. k++;
  16. Init(k);
  17. }
  18. else
  19. k--;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment