Submission #1078435

#TimeUsernameProblemLanguageResultExecution timeMemory
1078435ALeonidouBoxes with souvenirs (IOI15_boxes)C++17
0 / 100
1 ms356 KiB
#include "boxes.h" #include <bits/stdc++.h> using namespace std; #define ll int #define sz(x) (ll)x.size() #define F first #define S second #define pb push_back typedef vector <ll> vi; typedef pair <ll,ll> ii; typedef vector <ii> vii; #define dbg(x) cout<<#x<<": "<<x<<endl; #define dbg2(x,y) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl; #define dbg3(x,y,z) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl; void printVct(vi &v){ for (ll i =0; i<sz(v); i++){ cout<<v[i]<<" "; } cout<<endl; } ll n, k, l; vi v; long long delivery(int N, int K, int L, int p[]) { n = N, k = K, l = L; v.resize(n); for (ll i= 0; i<n; i++) v[i] = p[i]; ll ans = 0; for (ll i =0; i<n; i++){ ans += min(v[i], (l-v[i])) * 2; } return ans; } /* */
#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...