1 / 4
Oct 2012

To solve this3 problem within time limit I had to precompute the results and use this table within my code. But this approach is somewhat unsatisfying frowning

Is it possible to find and implement a fast algo in python which gets AC?

Cheers daft

  • created

    Oct '12
  • last reply

    Oct '12
  • 3

    replies

  • 336

    views

  • 2

    users

  • 1

    link

In the comment, I can read :

I would like to see this problem with a small size code limit.
It's more interesting, we all agree with that.

Regards.

Thanks for pointing this out.

Currently my code runs through the possible combinations for the numbers of dancers from Cubiconia, Quadradonia and Nlogonia, trying to skip combinations not suitable. Basically this is a nested loop through 2 variables for any given number of dances.

Is this a promising approach which only needs further optimization? Or is on the contrary a formula-based or recursive approach possible?

Thanks for any hints
Daft

I did something like that, with good start and end points !!! Thats all.