Loading...
Play Shots Wisely!
Time: 1 s
Memory: 500 MB
In the middle of a super exciting cricket season, the cricket champs, India and Australia, aren't just trying to score runs; they're in the middle of a cool challenge. It's not a usual cricket match – it's way more fun!
Both teams have a superstar batter with some awesome shots. Each shot has a special number attached to it. Now, the big goal is simple – both batters want to reach a certain score, and the one who gets there with the fewest shots is the big winner.
So, it's not just about hitting the ball, it's like a secret mission to score and be super smart about it. Who will come up with the coolest strategy and take the fewest shots to win the cricket crown?
Input
An integer n (1<=n<=100), representing the number of signature shots of the two batsmen.
An array aus_shots of size n, where aus_shots[i] (1<=aus_shots[i]<=50) represents the value of the i-th shot for the Australian batter.
An array ind_shots of size n, where ind_shots[i] (1<=ind_shots[i]<=50) represents the value of the i-th shot for the Indian batter.
An integer target (1<=target<=\(10^4\)), representing the ambitious target score both batsmen aspire to achieve.
Output
Print Australia if the Australian batsman takes fewer shots to reach the target.
Print India if the Indian batsman takes fewer shots to reach the target.
Print Draw if they both take an equal number of shots.
Examples
Input
Output
4
2 4 5 3
6 1 4 2
11
Draw
Input
Output
7
1 2 3 4 5 6 11
2 4 7 2 10 9 3
300
Australia
Problem Info
Problem ID 197
Time Limit 1000 ms
Memory Limit 512000 KB
Moderators Rafee , Alom_Shanto
Statistics
Submit
You need to Login or Registration for submit your solution