# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
768161 | caganyanmaz | Boxes with souvenirs (IOI15_boxes) | C++17 | 1 ms | 296 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 <bits/stdc++.h>
#define int int64_t
using namespace std;
map<int, int> mleft, mright;
int mid;
void safe_insert(map<int, int>& m, int val)
{
if (m.find(val) == m.end())
m[val] = 0;
m[val]++;
}
int delivery(int32_t N, int32_t K, int32_t L, int32_t p[])
{
for (int i = 0; i < N; i++)
if (p[i] > L / 2)
safe_insert(mright, p[i]);
else if (p[i] < L / 2)
safe_insert(mleft, p[i]);
else
mid++;
return 0;
}
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... |