-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path372.cpp
More file actions
55 lines (43 loc) · 872 Bytes
/
372.cpp
File metadata and controls
55 lines (43 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*****************************************
* (This comment block is added by the Judge System)
* Submission ID: 68288
* Submitted at: 2018-10-25 21:36:56
*
* User ID: 539
* Username: 55211931
* Problem ID: 372
* Problem Name: Jumping Mario
*/
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main()
{
int times;
cin >> times;
for (int i = 0; i < times; i++)
{
int high = 0;
int low = 0;
int thiswall;
int nextwall;
int wallNo;
cin >> wallNo;
cin >> thiswall;
for (int i = 1; i < wallNo; i++)
{
cin >> nextwall;
if (thiswall > nextwall)
{
low++;
}else if(thiswall<nextwall)
{
high++;
}
thiswall = nextwall;
}
cout << "Case " << i + 1 << ": " << high << " " << low << endl;;
}
return 0;
}