QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#298302 | #4832. Telepathy | fxhd | Compile Error | / | / | C++17 | 761b | 2024-01-05 23:23:03 | 2024-01-05 23:23:03 |
Judging History
This is the latest submission verdict.
- [2024-01-05 23:23:03]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-01-05 23:23:03]
- Submitted
answer
#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#include "debug.hpp"
#else
#define dbg(...) 0
#endif
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;
cin >> s;
array<int, 8> T;
if (s == "Flim") {
T = {2, 1, 0, 0, 2, 1, 2, 2};
}
else {
assert(s == "Flam");
T = {2, 0, 2, 0, 1, 1, 2, 2}
}
int n, k;
cin >> n >> k;
string a;
cin >> a;
assert(int(a.size()) == n);
vector<int> ans(k);
for (int i = 0; i < k; ++i) {
int b = (a[3 * i] == '1') * 4 + (a[3 * i + 1] == '1') * 2 + (a[3 * i + 2] == '1');
ans[i] = 3 * i + T[b];
}
for (int i = 0; i < k; ++i) {
if (i > 0) cout << ' ';
cout << (ans[i] + 1);
}
cout << '\n';
}
Details
answer.code: In function ‘int main()’: answer.code:22:33: error: expected ‘;’ before ‘}’ token 22 | T = {2, 0, 2, 0, 1, 1, 2, 2} | ^ | ; 23 | } | ~