Sponsors

Tag: problem: (A) Buying A House Solve in C

Codeforces Round #408 (Div....

#include<stdio.h> #include<stdlib.h> #include<math.h> #define MAX 1000000009 int main() { int i,n,m,k,min=MAX,t,temp; scanf("%d %d %d",&n,&m,&k); for(i=1;i<=n;i++) { scanf("%d",&t); if(t>0 && t<=k) { temp=abs(m-i); if(temp<min) min=temp; } } printf("%dn",(min*10)); return...

Advertisement

spot_img