forked from pankaj443/CODEFORCES
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path999A.cpp
More file actions
42 lines (39 loc) · 627 Bytes
/
999A.cpp
File metadata and controls
42 lines (39 loc) · 627 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
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1<<20;
vector<int>v;
int cnt,arr[N],b[N],has[N];
bool flag,flag1;
int main()
{
ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
int n,m;
cin>>n>>m;
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
for(int i=0;i<n;i++)
{
if(arr[i]<=m)
{
cnt++;
}
else break;
}
for(int i=n-1;i>0;i--)
{
if(arr[i]<=m)
{
cnt++;
}
else break;
}
if(cnt>n)
cout<<n;
else
cout<<cnt;
return 0;
}
//_4_4_3_//