We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- All Contests
- HourRank 17
- The Hurdle Race
- Discussions
The Hurdle Race
The Hurdle Race
Sort by
recency
|
14 Discussions
|
Please Login in order to post a comment
include
include
define max 100
int main() { int n,k,i,a[max],max1,j; scanf("%d\t%d",&n,&k); for(i=0;imax1) { max1=a[i]; } } j=max1-k; if(j<0) { printf("0"); } else { printf("%d",j); } return 0; }
simple cpp:
I submitted the code successfully , but it will not shown in my submission board . what can I do ?
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){
} else printf("%d",c);
}