Submission #668802

#TimeUsernameProblemLanguageResultExecution timeMemory
668802AstraytBoxes with souvenirs (IOI15_boxes)C++17
10 / 100
1 ms300 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long ll delivery(int N, int K, int L, int pos[]){ if(K == 1){ ll ret = 0; for(int i = 0; i < N; ++i){ int dist = min(pos[i], L - pos[i]); ret += 2ll * dist; } return ret; } }

Compilation message (stderr)

boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:14:1: warning: control reaches end of non-void function [-Wreturn-type]
   14 | }
      | ^
#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...