this is my solution
http://ideone.com/FB9VxG for the following problem http://codeforces.me/contest/572/problem/B
i really worked hard for this problem...but i couldnt find any wrong in my solution...
could anyone pls point out wrong in my solution...
pls help me..
thanks in advance
Sorry I don't know structs yet, and your code is a little complex and hard to read But if you want this is my solution if you want to compare http://codeforces.me/contest/572/submission/12655564 Hope I helped