and compare the expected result to your printing to see what is wrong in your code.
To avoid having a big gcd you should first simplify the fractions. On the other hand you could make this first calculation by hand to control your result.
Update: I added a small utility so that you can view your result and the expected result.
i can not understand this realy
It's better than other because it does not allocate extra bytes, it uses same string.
Условие не понятно, не понятно как взаимодействовать с данной функцией, что и куда возвращать. Very bad explain of problem.
crazy!
Are you hacker?
Run only the first "Sample Tests" with in your code (just before your return):
and compare the expected result to your printing to see what is wrong in your code.
To avoid having a big gcd you should first simplify the fractions. On the other hand you could make this first calculation by hand to control your result.
Update: I added a small utility so that you can view your result and the expected result.
Expected: equal to [unsupported type]
Actual: [unsupported type] genius. FIX IT FOR C++
You really want sort over 99999 elements only for find minimum?
Are you crazy?