#B3741. ICPC Team Ranking Comparison
ICPC Team Ranking Comparison
ICPC Team Ranking Comparison
In the ICPC competition, the ranking of two teams is determined by the number of solved problems and their penalty time. Let \(s\) denote the number of problems solved and \(t\) denote the penalty time.
The rules are as follows:
- If team A has solved more problems than team B, then team A ranks higher.
- If both teams have solved the same number of problems, then the team with the smaller penalty time \(t\) ranks higher.
- The case where both \(s\) and \(t\) are identical does not occur in this problem.
You are given the statistics of two teams. Your task is to determine which team ranks higher. Output 1 if the first team ranks higher, and 2 otherwise.
inputFormat
The input consists of two lines:
- The first line contains two integers separated by a space: the number of problems solved and the penalty time for the first team.
- The second line contains two integers separated by a space: the number of problems solved and the penalty time for the second team.
outputFormat
Output a single integer: 1 if the first team ranks higher, or 2 if the second team ranks higher.
sample
5 100
4 150
1