Submission #1044198

#TimeUsernameProblemLanguageResultExecution timeMemory
1044198UnforgettableplDistributing Candies (IOI21_candies)C++17
3 / 100
5050 ms13364 KiB
#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){ int n = c.size(); int q = v.size(); vector<int> s(n); for(int i=0;i<q;i++){ for(int x=l[i];x<=r[i];x++){ s[x]+=v[i]; s[x]=max(min(s[x],c[x]),0); } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...