Submission #480617

#TimeUsernameProblemLanguageResultExecution timeMemory
480617HaidaraDistributing Candies (IOI21_candies)C++17
0 / 100
5066 ms7260 KiB
#include<bits/stdc++.h> #include<candies.h> using namespace std; vector<int> distribute_candies(vector<int> c,vector<int> l,vector<int> r, vector<int> v) { vector<int>a((int)c.size(),0); for(int i=0;i<(int)l.size();i++) for(int j=l[i];j<=r[i];j++) if(v[i]>0) a[j]=min(a[j]+v[i],c[j]); else a[j]=max(0,a[j]-v[i]); return a; }
#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...