The Hurdle Race

  • + 0 comments

    simple cpp:

    for (int i = 0; i < n; i++){
            if (mb < height[i]){
                mb = height[i];
            }
        }
        if (mb > k){
            mb = mb - k;
        } else {
            mb = 0;
        }
     
        cout<<mb;