I am trying to solve the problem for a while but couldn't come up a idea. It would be great if someone can help me to solve the problem. I am a bit weak at math. I think its related to probability. Problem Link: https://vjudge.net/contest/312875#problem/E PS: The contest is Ended.
Thanks a lot :) sorry for my poor English. :)