The Hurdle Race

  • + 0 comments

    include

    include

    include

    include

    include

    include

    include

    int main(){ int n,i,j=0,c=0; int k,height_i; scanf("%d %d",&n,&k); int *height = malloc(sizeof(int) * n); for(height_i = 0; height_i < n; height_i++){ scanf("%d",&height[height_i]); } for(i=0;ij) j=height[i]; } if(j>k){

    j=j-k;
    printf("%d",j);
    

    } else printf("%d",c);

    // your code goes here
    return 0;
    

    }