#t68. 成绩起伏统计
成绩起伏统计
Score Fluctuation Statistics
Problem Description
Every test has a difficulty coefficient; the higher the difficulty coefficient, the lower the score; when difficulty coefficients are equal, scores are equal. The convention is:
- If a test's score is higher than the previous one, count one "Praise" (表扬);
- If it is lower than the previous one, count one "Criticism" (批评);
- If it is equal to the previous one, count nothing;
- The first test counts neither Praise nor Criticism.
Given the difficulty coefficient of each test this semester (in chronological order), count the number of "Criticisms" and the number of "Praises".
Input Format
The first line contains a positive integer ().
The second line contains positive integers (), representing the difficulty coefficient of each test in order.
Output Format
Output one line containing two integers, the number of Criticisms and the number of Praises, separated by a single space.
Sample Input 1
5
1 2 3 4 5
Sample Output 1
4 0
Sample Input 2
5
5 3 4 1 2
Sample Output 2
2 2