Submission #1088164

#TimeUsernameProblemLanguageResultExecution timeMemory
1088164browntoadBoxes with souvenirs (IOI15_boxes)C++14
10 / 100
1 ms428 KiB
#include <bits/stdc++.h> #include "boxes.h" using namespace std; #define ll long long // #define int ll #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) FOR(i, 0, n) #define REP1(i, n) FOR(i, 1, n+1) #define RREP(i, n) for (int i = (n)-1; i >= 0; i--) #define pii pair<int, int> #define f first #define s second #define pb push_back #define ALL(x) (x).begin(), (x).end() #define SZ(x) (int)((x).size()) const ll maxn = 1e5+5; ll delivery(int n, int k, int l, int pos[]){ ll ans = 0; REP(i, n){ ans += min(pos[i], l-pos[i]); } return ans*2; } /* signed main(){ } */

Compilation message (stderr)

boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:19:24: warning: unused parameter 'k' [-Wunused-parameter]
   19 | 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...