#include<bits/stdc++.h> using namespace std; int main() { int n,c; scanf("%d%d",&n,&c); int ans=0; int d=0; while (n--) { int t; scanf("%d",&t); if (t-d>c) ans=1; else ans++; d=t; } printf("%d\n",ans); return 0; }
Tuesday, September 20, 2016
Unknown
Studying at Shahjalal University of Science and Technology, Sylhet.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment