Submission #490827

# Submission time Handle Problem Language Result Execution time Memory
490827 2021-11-29T13:01:48 Z Karuk Distributing Candies (IOI21_candies) C++17
0 / 100
78 ms 13240 KB
#include<bits/stdc++.h>
using namespace std;
vector<int> distribute_candies(vector<int> c, vector<int> l, vector<int> r, vector<int> v)
{
    int n=sizeof(c);
    int q=sizeof(l);
    vector<int>ans(n,0);
    for(int i=0;i<q;i++)
    {
        for(int j=l[i];j<=r[i];j++)
        {
            if(v[i]>0)ans[j]=min(c[j],ans[j]+v[i]);
            else ans[j]=max(0,ans[j]+v[i]);
        }
    }
    return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 78 ms 13240 KB Execution killed with signal 11
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 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -