Submission #238778

#TimeUsernameProblemLanguageResultExecution timeMemory
238778lakshith_Boxes with souvenirs (IOI15_boxes)C++14
10 / 100
5 ms384 KiB
#include <bits/stdc++.h> #define ll long long using namespace std; inline void io_setup(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } ll delivery(int n,int k,int l,int positions[]){ ll ans = 0; for(int i=0;i<n;i++){ ans += 2*min(positions[i],l-positions[i]); } return ans; } // int main(){ // io_setup(); // cou // }

Compilation message (stderr)

boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:12:23: warning: unused parameter 'k' [-Wunused-parameter]
 ll delivery(int n,int k,int l,int positions[]){
                       ^
#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...