Submission #434865

#TimeUsernameProblemLanguageResultExecution timeMemory
434865jeqchoBoxes with souvenirs (IOI15_boxes)C++17
10 / 100
1 ms300 KiB
#include "boxes.h" #include <bits/stdc++.h> using namespace std; typedef long double ld; typedef long long ll; typedef pair<int,int> pii; typedef vector<int> vi; typedef vector<pair<int,int>> vpi; #define FOR(i,a,b) for (int i = (a); i < (b); ++i) #define F0R(i,a) FOR(i,0,a) #define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i) #define R0F(i,a) ROF(i,0,a) #define trav(a,x) for (auto& a: x) #define pb push_back #define rsz resize #define sz(x) int(x.size()) #define all(x) begin(x), end(x) #define fi first #define se second ll delivery(int N, int K, int L, int p[]) { ll ans=0; F0R(i,N) { ans+=min(p[i],L-p[i]); } return ans*2; }

Compilation message (stderr)

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