문제
There are
At any time when two worlds are at the same
For each
Each query output should be a fraction
SCORING:
Test cases 2-3 satisfy
N\le 100. Test cases 4-5 satisfy
N\le 2000. Test cases 6-14 satisfy no additional constraints.
Problem credits: Dhruv Rohatgi
입력
The first line of input contains a single integer
The next line contains
The next line contains
출력
Print
예제1
4
3 5 10 2
3 3 2 1
7/2
7/2
5/1
-1
Consider the answer for the cow originally on world 2. At time
출처
USACO 2020 January Platinum