# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
984174 |
2024-05-16T10:59:48 Z |
vjudge1 |
Game (APIO22_game) |
C++17 |
|
0 ms |
344 KB |
#include <bits/stdc++.h>
#include "game.h"
using namespace std;
const int N = 30300;
int n, k;
bitset<N> reach[N];
void init(int N, int K) {
n = N, k = K;
for (int i = n - 1; i >= 0; i--) {
reach[i][i] = 1;
if (i < k - 1) reach[i] |= reach[i + 1];
}
}
int add_teleporter(int u, int v) {
if (u == v && u < k) return 1;
if (v < k) {
if (reach[v][u]) return 1;
}
reach[u] |= reach[v];
if (u < k) {
for (int i = 0; i < k; i++) {
if (reach[u][i])
return 1;
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Wrong Answer[1] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Wrong Answer[1] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Wrong Answer[1] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Wrong Answer[1] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Wrong Answer[1] |
3 |
Halted |
0 ms |
0 KB |
- |