Submission #529923

# Submission time Handle Problem Language Result Execution time Memory
529923 2022-02-24T04:01:11 Z drdilyor Distributing Candies (IOI21_candies) C++17
0 / 100
5000 ms 12208 KB
#define ll long long
#define ii pair<int, int>
#define vi vector<int>
#define vii vector<pair<int, int>>
#define INF 1000000000
#include <bits/stdc++.h>
using namespace std;

vi distribute_candies(vi c, vi l, vi r, vi v) {
    int n = c.size();
    int q = l.size();
    vi res(n);
    for (int i = 0; i < q; i++) {
        for (int j = l[i]; j <= r[i]; j++) {
            res[j] += v[i];
            if (res[j] > c[j]) res[j] = c[j];
        }
    }
    return res;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 208 KB Output is correct
2 Incorrect 1 ms 204 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 5073 ms 12208 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 292 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 208 KB Output is correct
2 Incorrect 1 ms 204 KB Output isn't correct
3 Halted 0 ms 0 KB -