Submission #623034

# Submission time Handle Problem Language Result Execution time Memory
623034 2022-08-05T06:11:05 Z Hanksburger Distributing Candies (IOI21_candies) C++17
3 / 100
5000 ms 13604 KB
#include "candies.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
vector<int> distribute_candies(vector<int> c, vector<int> l, vector<int> r, vector<int> v)
{
    int n=c.size(), q=v.size();
    for (int i=0; i<n; i++)
        ans.push_back(0);
    for (int i=0; i<q; i++)
        for (int j=l[i]; j<=r[i]; j++)
            ans[j]=max(0, min(c[j], ans[j]+v[i]));
    return ans;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 2 ms 348 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 3 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 5013 ms 12492 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 212 ms 7948 KB Output is correct
3 Correct 208 ms 6860 KB Output is correct
4 Execution timed out 5033 ms 13604 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Correct 528 ms 5536 KB Output is correct
4 Correct 505 ms 3832 KB Output is correct
5 Execution timed out 5075 ms 8388 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 2 ms 348 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 3 ms 340 KB Output is correct
6 Execution timed out 5013 ms 12492 KB Time limit exceeded
7 Halted 0 ms 0 KB -