diff --git a/Algorithms/Implementation/hurdleRace.cpp b/Algorithms/Implementation/hurdleRace.cpp new file mode 100644 index 0000000..08dca7f --- /dev/null +++ b/Algorithms/Implementation/hurdleRace.cpp @@ -0,0 +1,16 @@ +#include +using namespace std; + +int main(){ + + int n,k,a,h = 0; + + cin >> n >> k; + for(int i = 0; i < n; i++){ + cin >> a; + if(a > h)h = a; + } + (k >= h) ? cout << 0 << endl : cout << h-k << endl; + + return 0; +}