Submission #671760

#TimeUsernameProblemLanguageResultExecution timeMemory
671760mseebacherBoxes with souvenirs (IOI15_boxes)C++17
10 / 100
1 ms340 KiB
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef vector<int> vi; ll sum = 0; ll delivery(int N, int K, int L, int pos[]){ for(int i = 0;i<N;i++){ sum += 2*min(pos[i],abs(pos[i]-L)); } return sum; }

Compilation message (stderr)

boxes.cpp: In function 'll delivery(int, int, int, int*)':
boxes.cpp:9:24: warning: unused parameter 'K' [-Wunused-parameter]
    9 | ll delivery(int N, int K, int L, int pos[]){
      |                    ~~~~^
#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...