http://codeforces.me/contest/185/problem/E
problem description doesn't mention what to output when there is no solution:
for example:
2 0 1 0 2 0
what's the output to this samples?? 0.5 or 1 or no solution.. problem description doesn't mention it at all...