I have write a solution for this problem and works well on the example case and other cases on my computer but when i submit it, i take wrong result for all the tests.
Can you take a look in my solution and tell me if i have any mistake?
http://z-trening.com/submit.php?submit=7100148091&subm_code=1
http://z-trening.com/submit.php?submit=7100148092&subm_code=1
Can you take a look in my solution and tell me if i have any mistake?
http://z-trening.com/submit.php?submit=7100148091&subm_code=1
http://z-trening.com/submit.php?submit=7100148092&subm_code=1