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 "game.h"
#include<bits/stdc++.h>
using namespace std;
const int mxN=3e4;
bitset<mxN> f,s,pt[mxN],cd[mxN];
void init(int n, int k){
for(int i=0; i<k; i++) f[i]=s[i]=1;
for(int i=0; i<n; i++) pt[i][i]=cd[i][i]=1;
for(int i=k-2; i>=0; i--) cd[i]|=cd[i+1];
for(int i=1; i<k; i++) pt[i]|=pt[i-1];
}
int add_teleporter(int u, int v){
cd[u]|=cd[v];
pt[v]|=pt[u];
if(s[v]) s|=pt[v];
if(f[u]) f|=cd[u];
if(f[u]&&s[v]) return 1;
else return 0;
}
# | 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... |