Submission #983798

#TimeUsernameProblemLanguageResultExecution timeMemory
983798batsukh2006Game (APIO22_game)C++17
0 / 100
1 ms2548 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...