Rubik
Rubik programming problem - a better asymptotical solution
English explanation of the solution
Romanian explanation of the solution
The corrected implementation of the program, but using only "long double"s (works for n < 35 and any m, yes, I know, you can swap m and n if n > m, but I didn't do that). Program for Borland C++ 3.1 (old, I know).
The corrected implementation of the program, using 256 bit fractional numbers. Program for GNU/Linux gcc.
Instructions for the GNU/Linux gcc variant