QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#46764 | #4670. How To Identify Self | Qingyu | WA | 3ms | 3636kb | C++23 | 870b | 2022-09-01 16:43:11 | 2022-09-01 16:43:14 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int query(string x) {
cout << "? " << x << endl;
int ans;
cin >> ans;
return ans;
}
int main() {
query("e2");
if (query("e4")) {
if (query("d5")) {
query("e4");
query("e2");
puts("! q");
}
else {
query("e2");
puts("! r");
}
}
else {
if (query("d3")) {
if (query("b5")) {
query("e2");
puts("! b");
}
else {
query("e2");
puts("! k");
}
}
else {
if (query("d4")) {
query("e2");
puts("! n");
}
else {
puts("! p");
}
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3568kb
input:
1 1 0 1
output:
? e2 ? e4 ? d5 ? e2 ! r
result:
ok you are r, used 4 steps
Test #2:
score: 0
Accepted
time: 2ms
memory: 3564kb
input:
0 0 0 0
output:
? e2 ? e4 ? d3 ? d4 ! p
result:
ok you are p, used 4 steps
Test #3:
score: -100
Wrong Answer
time: 3ms
memory: 3636kb
input:
1 0 1 1
output:
? e2 ? e4 ? d3 ? b5 ? e2
result:
wrong answer query limit exceeded