# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
996433 | yanb | Snake Escaping (JOI18_snake_escaping) | C++14 | 1916 ms | 23892 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>
using namespace std;
#define int long long
#define pii pair<long long, long long>
#define t3i tuple<long long, long long, long long>
const int MinVop = 6;
int calc(vector<int> &tri, int x, int l, string &tox) {
if (l == x) {
int v = 0;
for (int i = 0; i < l; i++) {
v *= 2;
v += tri[i];
}
return tox[v] - '0';
}
if (tri[x] == 2) {
int ans = 0;
tri[x] = 0;
ans += calc(tri, x + 1, l, tox);
tri[x] = 1;
ans += calc(tri, x + 1, l, tox);
tri[x] = 2;
return ans;
}
return calc(tri, x + 1, l, tox);
}
# | 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... |