codeforces.com/contest/1730/problem/B

Revision en1, by AHMADUL, 2022-12-03 20:46:17

I don't know how accurate my observation is! But, I think there is a bug in the accepted solutions to this problem. For example, let's see the third example: x1=1, x2=4, t1=0, t2=0. Here they say the answer will be unique and that is 2.5 but the answer can be 2 also! Consider, another example: n=3, x1=1, x2=3, x3=11 and t1=t2=t3=0; The accepted code gives answer: 6 (the meeting point). Analysis: |x1-6|+|x2-6|+|x3-6|=13; But, if we choose 2 as the meeting point, then the absolute sum is: |11-2|+|3-2|+|1-2|=11 which is lesser than 13(the accepted output) Could anyone please help me to understand this concept?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English AHMADUL 2022-12-04 03:25:41 119
en2 English AHMADUL 2022-12-03 20:47:18 8
en1 English AHMADUL 2022-12-03 20:46:17 658 Initial revision (published)