Thx I've got ACC. I use backtracking too, and my program runs for 0.01s only. Not bad for a Pascal program, eh?
Btw, backtracking problems are fun! Please, if there are any other problems that can be solved by backtracking, tell me.
Some problems that can be solved by backtracking/exhaustion by recursion are listed below
(Of course, some of them could be solved with the help of DP) :
00140 Bandwidth
00165 Stamps
00167 Sultan's Successors, the
00193 Graph Colouring
00195 Anagrams
00216 Getting in Line
00259 Software Allocation
00291 House of Santa Claus, the
00296 Safebreaker
00301 Transportation
00399 Another Puzzling Problem (* the 500th problem that i've solved! *)
00441 Lotto
00524 Prime Ring Problem
00539 Settlers of Catan
00565 Pizza Anyone?
00574 Sum It Up
00598 Bundling Newspapers
00628 Passwords
00639 Don't Get Rooked
00656 Optimal Programs
00729 Hamming Distance Problem
00732 Anagrams by Stack
00750 8 Queens Chess Problem
10063 Knuth's Permutation
10068 Treasure Hunt, the
10098 Generating Fast, Sorted Permutations
10186 Euro Cup 2000
10344 23 out of 5
10364 Square
10400 Game Show Math
10419 Sum-up the Primes
10422 Knights in FEN
10447 Sum-up the Primes II
10496 Collecting Beepers
10501 Simplified Shisen-Sho
10503 Domino Solitaire, the
10513 Bangladesh Sequences
10582 ASCII Labyrinth
10605 Mines for Diamonds
10637 Coprimes
[Keywords] exhaustion backtracking Pascal easy recursion problems
(p.s. how i like this abandoned topic. my free area :p)