Here's my code , i kind of optimized it so it doesn't give TLE or some memory errors.
But i get wrong result on testcase: 5,8,10.
I'm sort of lost with it , i can't find any logical faults.
http://www.z-trening.com/new/www/html/submit.php?submit=7100044969&subm_code=1
But i get wrong result on testcase: 5,8,10.
I'm sort of lost with it , i can't find any logical faults.
http://www.z-trening.com/new/www/html/submit.php?submit=7100044969&subm_code=1