# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
570311 | 2022-05-29T08:04:13 Z | 장태환(#8350) | Inside information (BOI21_servers) | C++17 | 343 ms | 1148 KB |
#include <bits/stdc++.h> //Announcing plan to get the test data is probably not a good idea using namespace std; int app[120100]; int main() { int N, K; cin >> N >> K; int i; int c=1; for (i = 0; i < N + K - 1; i++) { char a; cin >> a; if (a == 'S') { int a, b; cin >> a >> b; app[a] = app[b] = c++; } else if (a == 'Q') { int a, b; cin >> a >> b; if (b == 1 && app[a] || a == b || a == 1 && app[b]||app[a]&&app[b]&&app[a]>app[b]) cout << "yes"; else cout << "no"; cout << '\n'; } else { int a; cin >> a; if (a == 1) cout << c << '\n'; else cout << app[a]?(c- app[a] + 1) :1<< '\n'; } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 214 ms | 584 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 214 ms | 584 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 209 ms | 592 KB | Output is correct |
2 | Correct | 294 ms | 1052 KB | Output is correct |
3 | Correct | 343 ms | 1148 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 209 ms | 592 KB | Output is correct |
2 | Correct | 294 ms | 1052 KB | Output is correct |
3 | Correct | 343 ms | 1148 KB | Output is correct |
4 | Incorrect | 211 ms | 584 KB | Extra information in the output file |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 211 ms | 732 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 211 ms | 732 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 212 ms | 684 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 212 ms | 684 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 225 ms | 640 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 225 ms | 640 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 207 ms | 588 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 207 ms | 588 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |