Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define ll long long int
- int main()
- {
- ll t;
- scanf("%d",&t);
- for(int i=1; i<=t; i++)
- {
- ll n;
- scanf("%d",&n);
- ll s[n];
- for(int j=0; j<n; j++)
- {
- scanf("%d",&s[j]);
- }
- ll high=0,low=0;
- for(int j=0; j<n-1; j++)
- {
- if(s[j]<s[j+1])
- high++;
- else if(s[j]>s[j+1])
- low++;
- else continue;
- }
- printf("Case %d : %d %d\n",i,high,low);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement