Question: Please use JAVA to solve this question, Thanks!!! 1. Autonomous Driving Village Competition The annual Village Autonomous Driving Competition is a grand competition. The rules
Please use JAVA to solve this question, Thanks!!!


1. Autonomous Driving Village Competition The annual Village Autonomous Driving Competition is a grand competition. The rules of the competition are that the participating vehicles compete in pairs, the losing party will be eliminated while the winning party get to enter the next round of competition; the final winner will the champion of the competition! The data of previous competitions records the sequence of the first round of the competition (each car is numbered consecutively from 1) and the score of each car (each car has a different score, and the higher score must win the lower score). See figure below: No.4 No.3 No.4 No.1 No.3 No.2 No.4 The order of competition is: 1 3 2 4 (The first round of No. 1 and No. 2 matches, No. 3 and No. 4 matches) Vehicle scores: 1 point for No. 1, 3 points for No. 2, 2 points for No. 3, 4 points for No. 4 Then the matchup is shown in the figure: Whether the competition is interesting or not depends on whether the two cars with the 1st score and the 1st last score have competed. As in the example above, the two cars with the first score and the 1st last score are No. 4 and No. 1, respectively. No. 1 has only raced with No. 2 and No. 1 and No. 4 have not raced, so this competition is not interesting. E Now to provide you with the competition data of the previous n years, you need to judge whether the competition of each year is interesting. Input: A first line integer number n(0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
