#include<stdio.h>
#define MAX_N 110
int house[MAX_N];
int main(){
int n,m,k;
scanf("%d%d%d",&n,&m,&k);
for(int i=1;i<=n;i++){
scanf("%d",&house[i]);
if(house[i]==0)
house[i]=k+2;
}
int i=1;
while(1){
if(m-i>=1){
if(house[m-i]<=k)
break;
}
if(m+i<=n)
if(house[m+i]<=k)
break;
i++;
}
printf("%d",i*10);
}
Codeforces Round #408 (Div. 2) A Buying A House
最新推荐文章于 2022-11-22 23:15:14 发布