10814: 淘汰赛制

内存限制:128 MB 时间限制:1.000 S 提交:12 解决:4
评测方式:文本比较 命题人:

题目描述

淘汰赛制是一种极其残酷的比赛制度。lns="http://www.w3.org/1998/Math/MathML">2 名选手分别标号 lns="http://www.w3.org/1998/Math/MathML">1,2,3,,21,2,他们将要参加 lns="http://www.w3.org/1998/Math/MathML"> 轮的激烈角逐。每一轮中,将所有参加该轮的选手按标号从小到大排序后,第 lns="http://www.w3.org/1998/Math/MathML">1 位与第 lns="http://www.w3.org/1998/Math/MathML">2 位比赛,第 lns="http://www.w3.org/1998/Math/MathML">3 位与第 lns="http://www.w3.org/1998/Math/MathML">4 位比赛,第 lns="http://www.w3.org/1998/Math/MathML">5 位与第 lns="http://www.w3.org/1998/Math/MathML">6 位比赛……只有每场比赛的胜者才有机会参加下一轮的比赛(不会有平局)。这样,每轮将淘汰一半的选手。lns="http://www.w3.org/1998/Math/MathML"> 轮过后,只剩下一名选手,该选手即为最终的冠军。

现在已知每位选手分别与其他选手比赛获胜的概率,请你预测一下谁夺冠的概率最大。

输入

第一行是一个整数 lns="http://www.w3.org/1998/Math/MathML">(110),表示总轮数。接下来 lns="http://www.w3.org/1998/Math/MathML">2 行,每行 lns="http://www.w3.org/1998/Math/MathML">2 个整数,第 lns="http://www.w3.org/1998/Math/MathML"> 行第 lns="http://www.w3.org/1998/Math/MathML"> 个是 lns="http://www.w3.org/1998/Math/MathML">,。(lns="http://www.w3.org/1998/Math/MathML">0100lns="http://www.w3.org/1998/Math/MathML">,=0lns="http://www.w3.org/1998/Math/MathML">,+,=100),表示第 lns="http://www.w3.org/1998/Math/MathML"> 号选手与第 lns="http://www.w3.org/1998/Math/MathML"> 号选手比赛获胜的概率。

输出

输出只有一个整数 lns="http://www.w3.org/1998/Math/MathML">,表示夺冠概率最大的选手编号(若有多位选手,输出编号最小者)。

样例输入 复制

2
0 90 50 50
10 0 10 10
50 90 0 50
50 90 50 0

样例输出 复制

 1