QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#664697 | #7156. Find the Box | njoop# | WA | 0ms | 3592kb | C++17 | 814b | 2024-10-21 21:49:09 | 2024-10-21 21:49:09 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int h, w, x, y;
int main() {
cin >> h >> w;
string s;
for(int i=1; i<=200; i++) {
s.append("<^");
}
cout << "? " << s << endl;
cin >> x >> y;
for(int i=0; i<w-1; i++) {
s = "";
for(int j=0; j<h-1; j++) {
s.append(i%2 ? "^" : "v");
}
s.append("<");
cout << "? " << s << endl;
cin >> x >> y;
if(i%2 == 0 && x != h-1) {
cout << "! " << x+1 << " " << y;
return 0;
}
if(i%2 == 1 && x != 0) {
cout << "! " << x-1 << " " << y;
return 0;
}
if(y != i+1) {
cout << "! " << x << " " << y+1;
return 0;
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3592kb
input:
4 5 0 0 3 0
output:
? <^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^...
result:
wrong answer expected (2,3) but got (3,1)