#CCBCHBAHAI0000138. So sánh bộ ba (Compare the Triplets)
So sánh bộ ba (Compare the Triplets)
Compare the Triplets
Source: HackerRank
Version: Phuoc Hung OJ Extended
Problem Statement
Alice and Bob each have three ratings for a programming challenge. contains Alice's ratings and contains Bob's ratings.
For each :
- if , Alice receives point;
- if , Bob receives point;
- if , neither receives a point for that position.
Compute Alice's and Bob's total comparison scores.
Input
- The first line contains .
- The second line contains .
Output
Print two integers on one line: Alice's score first, then Bob's score.
Subtasks
Subtask 1 (100 points): and for .
Examples
Input
5 6 7
3 6 10
Output
1 1
Explanation
At index , , so Alice receives one point. At index , , so neither receives a point. At index , , so Bob receives one point. The final scores are 1 1.