ordered is only 200points and it takes me quite some time to finish! This seemingly easy job is not as trivial as it looks like as I have to use a map to check the highest freq and use gcd to finalize result.
However, I checked some guy with as double much points as I made. Hist code is neat and clean since he does multiple scan to achieve each task. i.e. to check if it is acsending, do one scan. then do non-ascending scan. then ... and calculate mean for one scan. calculate freq, do one scan etc. In my code, I do one scan and achieve all task. And I got almost one third of his score! Of course I did a few mistake, but both of them are English problem! the format and the English grammar. Who will call non-ascending with a descending with repeating? Is it a culture factor?
Merge branch 'topcoder' of ssh://github.com/nickhuang99/staroceans into topcoder