# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1105599 | Faggi | Sails (IOI07_sails) | C++11 | 40 ms | 9332 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 ll long long
using namespace std;
const int MAXN = 1e5;
const int MAXS = 262144;
ll seg[MAXS], dp[MAXN], vf[MAXN],pot=131072, dpCalc[MAXN+1];
void calc(ll x, ll nod)
{
if (nod >= pot)
{
vf[nod - pot] = x;
return;
}
ll iz, der, mid, maD;
mid = x / 2ll;
iz = mid;
der = mid;
if (der + der < x)
der++;
maD = seg[nod * 2 + 1];
if (maD < der)
{
iz += der - maD;
der = maD;
}
if (iz > 0)
calc(iz, nod * 2);
if (der > 0)
calc(der, nod * 2 + 1);
}
# | 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... |
# | 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... |