Problem link: https://uva.onlinejudge.org/external/121/p12143.pdf
I got a solution here : http://mypaper.pchome.com.tw/zerojudge/post/1325083499
But I failed to understand how the problem is reduced to gaussian elimination. Can anybody explain please? If there are any other ideas please feel free to share.
Thanks for you help.