#CCBOTPBA0000004. Hai bộ đếm điểm đối đầu (Head-to-Head Result Counters)
Hai bộ đếm điểm đối đầu (Head-to-Head Result Counters)
Head-to-Head Result Counters
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
For each of n rounds, compare A’s score a with B’s score b; count A wins, B wins, and ties independently.
Input
An integer n, followed by n score pairs a b.
Output
Print the counts A B T separated by spaces.
Subtasks
-
Subtask 1 (20%):
n ≤ 10, scores0..10. -
Subtask 2 (30%):
n ≤ 1000, scores0..100. -
Subtask 3 (50%):
n ≤ 100000, scores0..100.
Examples
Example 1
Input:
3
3 2
1 4
5 5
Output:
1 1 1
Explanation: A wins the first, B the second, and the third is tied.
Example 2
Input:
0
Output:
0 0 0
Explanation: There are no rounds.