Submission #132284

#TimeUsernameProblemLanguageResultExecution timeMemory
132284redaBoxes with souvenirs (IOI15_boxes)C++14
0 / 100
8 ms376 KiB
#include<bits/stdc++.h> #define MIN(a,b) ((a) < (b) ? (a) : (b)) #include"boxes.h" using namespace std ; long long delivery( int n , int k , int l , int pos[]) { if(k==1){ vector<int> arr(n); for(int i=0;i<n;i++) { arr[i]=MIN(-pos[i]+l , pos[i] ); } int c=0; while (*min_element(arr.begin(),arr.end())!= (int)1e9+5) { //cout<<*min_element(pos.begin(),pos.end())<<endl; c+=*min_element(arr.begin(),arr.end())*2; *min_element(arr.begin(),arr.end())=(int)1e9+5; } return c; } return 0; }
#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...