405917: GYM102156 H Jeopardy

Memory Limit:0 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

H. Jeopardytime limit per test2 secondsmemory limit per test512 mebibytesinputstandard inputoutputstandard output

You are playing the final round of an intellectual game. A total of $$$n$$$ topics were selected, and each of the $$$n$$$ authors prepared a question for each topic. For each topic $$$i$$$ and each author $$$j$$$, you know the probability that you will answer the question from the $$$j$$$-th author on the $$$i$$$-th topic.

Before you actually get the question, $$$n-1$$$ turns are made. Two actions happen during each turn. First, you discard all questions of any single topic. Second, the moderator discards all questions from any single author. Eventually only one question remains. If you answer it correctly, you win the round.

Of course, you discard columns trying to maximize the probability of your victory. On the contrary, the moderator tries do minimize it.

If you both play optimally, what is the probability that you answer the remaining question?

Input

In the first line, there is a single integer $$$n$$$ ($$$1 \leq n \leq 500$$$), the number of topics and authors. Then follow $$$n$$$ lines with $$$n$$$ integers on each line. The $$$i$$$-th line corresponds to the $$$i$$$-th topic, and the $$$j$$$-th number on it is the probability that you will answer the question by the $$$j$$$-th author.

The probabilities are given as percentages. All integers in the description of topics are between $$$0$$$ and $$$100$$$.

Output

Print a single number: the desired probability as a percentage.

ExamplesInput
2
1 100
99 0
Output
1
Input
3
0 50 100
100 0 50
50 100 0
Output
0

加入题单

算法标签: