Submission #728427

#TimeUsernameProblemLanguageResultExecution timeMemory
728427AndrijaMBoxes with souvenirs (IOI15_boxes)C++14
0 / 100
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; const int maxn=2e5+10; long long delivery(int n, int K, int l, int p[]) { long long ans=0; int k=K; for(int i=0;i<n;i++) { if(k==0) { k=K; ans+=min(2*p[i-1],l); } k--; } ans+=min(2*p[n-1],l); return ans; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...