# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1105684 | FucKanh | Snake Escaping (JOI18_snake_escaping) | C++11 | 1081 ms | 54444 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
#define int ll
#define pii pair<int,int>
using namespace std;
const int BIT = 20;
int f[1<<BIT], g[1<<BIT], h[1<<BIT], ans;
void solve2(int i, vector<int> &v, int val) {
if (i==v.size()) {
ans += h[val];
return;
}
val &= ~(1<<v[i]);
solve2(i+1,v,val);
val |= (1<<v[i]);
solve2(i+1,v,val);
}
void solve1(int i, vector<int> &v, int val, int cnt) {
if (i==v.size()) {
if (cnt==0) return;
if (cnt%2) {
ans -= f[val];
}
else {
ans += f[val];
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... |