LEALCO - Editorial

When i ran my backtracking algo code http://www.codechef.com/viewsolution/1728088 (on my device and not on codechef)for the test file input.txt , it took more than 2 sec(for 10 test cases). Although , after seeing the solution , i realized that my solution was correct and was AC in practice section. But still I don’t get it , how could it take more than 2 sec on my device and still an AC.

Could you please check that the attached test file does not give TLE for the AC solutions

Codechef server is very fast.
It is Intel Pentium G860 3GHz.
Refer to this (it is Cube).
Tester first solution runs in 0.01 seconds on your test file.
While maximal time for your solution over our test data is 0.08.

Both the solution given are brute force solutions. What I do not understand is that is there no algorithmic approach to this question. I understand that these solution perform very well but am just curious about if there can be some algorithm for this.

Nice Question