Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //thanks God For Every Thing!
- //contest link:
- //#include<bits/stdc++.h>
- #include<iostream>
- #include<string>
- #include<algorithm>
- #include<cstdio>
- #define pi acose(-1)
- #define flush cin.ignore(numeric_limits<streamsize>::max(),'\n');
- #define wow ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
- #define NL printf("\n")
- using namespace std;
- typedef long long int ll;
- typedef double dl;
- // ---------------------- slove---------------------------//
- int main()
- {
- int arr[6];
- for(int i=0; i<5; i++)
- {
- cin>>arr[i];
- }
- int cnt1=0, cnt2=0;
- for(int i=0; i<5; i++)
- {
- if(arr[i]<arr[i+1])
- {
- cnt1++;
- }
- }
- for(int i=0; i<5; i++)
- {
- if(arr[i]>arr[i+1])
- {
- cnt2++;
- }
- }
- cout<<cnt1<<endl;
- cout<<cnt2<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement