# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
741828 |
2023-05-15T01:20:14 Z |
Mauve |
Game (APIO22_game) |
C++17 |
|
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> visited[1001];
vector<int> v[30001];
bool shit;
void init(int n, int k) {
n=n;
k=k;
for(i=0;i<k;i++) visited[i].set(i);
}
int add_teleporter(int u, int p){
v[u].pb(p);
for(i=0;i<k;i++){
if(visited[i][u]){
queue<int> q;
q.push(p);
for (; !q.empty(); ) {
const int x = q.front();
q.pop();
if (x <= i) {
return 1;
}
if (!visited[i][x]) {
visited[i].set(x);
for (const int y : v[x]) {
q.push(y);
}
}
}
}
}
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 |
- |