Thursday, December 11, 2014

ACM 2011. Long Statement / Длинное условие

First of all sort all the numbers, then our goal is to check the number of different permutations , if that numbers exceeds 5 then the answer is Yes. If you are using C++ you can easily handle everything with the next_permutation function in the library "algorithm" , if not then read about getting the next permutation of a sequence here.



       FULL SOURCE CODE 

No comments:

Post a Comment