|
0
I've got it. You're right. I missed that grains can be different in weight. I supposed that grains are the same weight. Ok. |
|
-12
It seems the tests for div2 A problem are not correct. My solution could not pass these tests but I consider it as correct. Most contestants use solution based on algorithm like checking just n*(a-b) and n*(a+b) against c-d and c+d. And the system considers these solutions like successful ones. For example, p=n*(a-b) q=n*(a+b) r=c-d s=c+d f=0 if(p>s or q<r): f=1 if(f==1): print("NO") else: print("YES") Check this algorithm on such data like n = 10, a = 5, b = 1, c = 55, d = 1 and you find this algorithm incorrect. (p=40, q=60, r=54, s=56 => f=0 => Yes). I ask testers to verify their tests or to request author for problem reformulation. |