# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
832321 | 2023-08-21T08:56:30 Z | radaiosm7 | Inside information (BOI21_servers) | C++ | 188 ms | 524288 KB |
#include <bits/stdc++.h> using namespace std; #define X first #define Y second int n, k, i, a, b; char quer; bitset<120005> bts[120005]; int main() { scanf("%d%d", &n, &k); for (i=1; i <= n; ++i) bts[i].set(i); for (i=1; i <= n+k-1; ++i) { scanf("\n%c", &quer); if (quer == 'S') { scanf("%d%d", &a, &b); bts[a] = bts[a]|bts[b]; bts[b] = bts[a]; } else if (quer == 'Q') { scanf("%d%d", &a, &b); if (bts[a][b]) printf("yes\n"); else printf("no\n"); } else { scanf("%d", &a); printf("0\n"); } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 20 ms | 2260 KB | Output is correct |
2 | Correct | 72 ms | 60740 KB | Output is correct |
3 | Correct | 69 ms | 60764 KB | Output is correct |
4 | Correct | 71 ms | 60748 KB | Output is correct |
5 | Correct | 67 ms | 60688 KB | Output is correct |
6 | Correct | 68 ms | 60800 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 20 ms | 2260 KB | Output is correct |
2 | Correct | 72 ms | 60740 KB | Output is correct |
3 | Correct | 69 ms | 60764 KB | Output is correct |
4 | Correct | 71 ms | 60748 KB | Output is correct |
5 | Correct | 67 ms | 60688 KB | Output is correct |
6 | Correct | 68 ms | 60800 KB | Output is correct |
7 | Incorrect | 20 ms | 2252 KB | Extra information in the output file |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 21 ms | 2220 KB | Output is correct |
2 | Runtime error | 188 ms | 524288 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 21 ms | 2220 KB | Output is correct |
2 | Runtime error | 188 ms | 524288 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 20 ms | 2260 KB | Output is correct |
2 | Runtime error | 170 ms | 524288 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 20 ms | 2260 KB | Output is correct |
2 | Runtime error | 170 ms | 524288 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 21 ms | 2248 KB | Output is correct |
2 | Runtime error | 162 ms | 524288 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 21 ms | 2248 KB | Output is correct |
2 | Runtime error | 162 ms | 524288 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 20 ms | 2284 KB | Output is correct |
2 | Runtime error | 169 ms | 524288 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 20 ms | 2284 KB | Output is correct |
2 | Runtime error | 169 ms | 524288 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 21 ms | 2252 KB | Output is correct |
2 | Correct | 72 ms | 60760 KB | Output is correct |
3 | Correct | 64 ms | 60772 KB | Output is correct |
4 | Correct | 95 ms | 60748 KB | Output is correct |
5 | Correct | 70 ms | 60780 KB | Output is correct |
6 | Correct | 75 ms | 60748 KB | Output is correct |
7 | Correct | 21 ms | 2212 KB | Output is correct |
8 | Runtime error | 155 ms | 524288 KB | Execution killed with signal 9 |
9 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 21 ms | 2252 KB | Output is correct |
2 | Correct | 72 ms | 60760 KB | Output is correct |
3 | Correct | 64 ms | 60772 KB | Output is correct |
4 | Correct | 95 ms | 60748 KB | Output is correct |
5 | Correct | 70 ms | 60780 KB | Output is correct |
6 | Correct | 75 ms | 60748 KB | Output is correct |
7 | Correct | 21 ms | 2212 KB | Output is correct |
8 | Runtime error | 155 ms | 524288 KB | Execution killed with signal 9 |
9 | Halted | 0 ms | 0 KB | - |