# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
807727 | 2023-08-04T23:27:05 Z | Mouad_ouj | Distributing Candies (IOI21_candies) | C++17 | 5000 ms | 7232 KB |
#include "candies.h" #include<bits/stdc++.h> using namespace std; vector<int> distribute_candies(vector<int> c, vector<int> l, vector<int> r, vector<int> v) { vector<int> a; a.assign(c.size()+1,0); for(int y=0;y<l.size();y++) { for(int x=l[y];x<r[y];x++) { if(v[y]>0) a[x]=min(a[x]+v[y],c[x]); else a[x]=max(a[x]+v[y],0); } } return a; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 5064 ms | 7232 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |