Submission #741821

# Submission time Handle Problem Language Result Execution time Memory
741821 2023-05-15T01:11:50 Z Mauve Game (APIO22_game) C++17
0 / 100
1 ms 976 KB
#include "game.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define INF 1e18
#define ss second
#define ff first
int n,m,l,r,i,j,k,ii,jj,x,y;
bitset<30001> vis[1001];
vector<int> v[30001];
bool shit;
void init(int n, int k) {
	n=n;
	k=k;
	for(i=0;i<k;i++) vis[i].set(i);
}
void dfs(ll node){
	if(shit) return;
	if(node<=r){
		shit=1;
		return;
	}
	if(vis[i][node]) return;
	vis[i].set(node);
	for(int it: v[node]) dfs(it);
}
int add_teleporter(int u, int p){
	v[u].pb(p);
	for(i=0;i<k;i++){
		if(vis[i][u]){
			shit=0;
			r=i;
			dfs(p);
			if(shit) return 1;
		}
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 976 KB Wrong Answer[1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 976 KB Wrong Answer[1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 976 KB Wrong Answer[1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 976 KB Wrong Answer[1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 976 KB Wrong Answer[1]
2 Halted 0 ms 0 KB -