I think there might be problem while using precision in push-relabel, depending on implementation. I tried out BelmanFord, Dinic and PR. The first 2 gave me correct answer on Judge without using any precision, but PR failed at some test cases. I tried using precision in PR, ended up in endless loop for statement if(flow > -1*PRECISION). I finally got through with PR after checking impossible flow and NOT using any precision.
If your PR worked on flow-network problems from earlier weeks, than this should work:
1. change your PR so that it returns double flow
2. after reading input, check (with BFS for exmaple) if node (n) is reachable from node (1), if not, return impossible.
3. if (n) is reachable from (1), then from constraints there is a non-zero max-flow, return this max-flow. The returned values in my case were good enough for me to not have to use any precision.
If you still get wrong answer after this (still better than time limit), check your function that computes area of the valve. I might be the only stupid one, but in my case, there was a mistake in this particular part:
Math.toRadians(180 / edge_count))
First I did not realize I could use the form Math.PI / edge_count instead of above, so I stick with the above until I realize that is the cause of my failure, as 180 / edge_count is integral division. It took me a lot of time and a friend's help to find it, as it is so invisible. So, just a reference for those who are going to solve the problem.