#P1769. 淘汰赛制
淘汰赛制
Description
The single-elimination system is a very brutal competition format. There are players numbered , and they will compete for rounds. In each round, after sorting all players participating in that round by increasing index, the -st plays the -nd, the -rd plays the -th, the -th plays the -th, and so on. Only the winner of each match advances to the next round (there are no ties). Thus, each round eliminates half of the players. After rounds, exactly one player remains, who is the champion.
Now you are given, for every pair of players, the probability that one beats the other. Please predict which player has the highest probability of winning the championship.
Input Format
The first line contains an integer (), the total number of rounds. Then follow lines, each containing integers; in line , the -th number is . The constraints are , , and . Here denotes the probability (in percent) that player defeats player .
Output Format
Output a single integer , the index of the player whose probability of becoming the champion is the highest (if there are multiple such players, output the smallest index).
2
0 90 50 50
10 0 10 10
50 90 0 50
50 90 50 0
1
Hint
- of the testdata satisfies .
- of the testdata satisfies .
Source: NOI Guide 2010 Senior (01).
Translated by ChatGPT 5
京公网安备 11011102002149号