Submission #983798

# Submission time Handle Problem Language Result Execution time Memory
983798 2024-05-16T06:21:12 Z batsukh2006 Game (APIO22_game) C++17
0 / 100
1 ms 2548 KB
#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
1 Correct 1 ms 2548 KB Output is correct
2 Incorrect 0 ms 2388 KB Wrong Answer[1]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2548 KB Output is correct
2 Incorrect 0 ms 2388 KB Wrong Answer[1]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2548 KB Output is correct
2 Incorrect 0 ms 2388 KB Wrong Answer[1]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2548 KB Output is correct
2 Incorrect 0 ms 2388 KB Wrong Answer[1]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2548 KB Output is correct
2 Incorrect 0 ms 2388 KB Wrong Answer[1]
3 Halted 0 ms 0 KB -