Submission #1084341

# Submission time Handle Problem Language Result Execution time Memory
1084341 2024-09-06T02:19:57 Z vjudge1 Rabbit Carrot (LMIO19_triusis) C++17
0 / 100
1 ms 664 KB
#include <bits/stdc++.h>
using namespace std;

int main() {
    int n, m;
    cin >> n >> m;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    int dem=0;
    for (int i = 1; i < n; i++) {
        int sum = a[i] - a[i-1];
        if (sum > m) 
            dem++;
    }
    cout << dem;

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 664 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 664 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 664 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 664 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -