# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
223595 | a_player | Boxes with souvenirs (IOI15_boxes) | C++14 | 5 ms | 384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "boxes.h"
#include <bits/stdc++.h>
#define f first
#define s second
using namespace std;
typedef long long ll;
map<int,int> m;
long long delivery(int N, int K, int L, int p[]) {
for(int i=0;i<N;i++){
m[p[i]]++;
}
ll ans=0;
int pos=0;
for(auto x:m){
ans+=min(x.f-pos,pos+L-x.f);
pos=x.f;
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |