# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
63911 | Kubalionzzale | Boxes with souvenirs (IOI15_boxes) | C++14 | 0 ms | 0 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.
long long int sumright = p[here], leftright = -1;
cur = k - 1;
for (int i = here + 1; i < n; ++i)
{
if (cur == 0)
{
sumright += p[i - 1] + p[i] * 1LL;
cur = k - 1;
}
else
{
sumright += p[i - 1] - p[i] * 1LL;
--cur;
}
}
sumright += p[n - 1] * 1LL;