QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#664640 | #7156. Find the Box | spycoderyt# | WA | 1ms | 3752kb | C++14 | 861b | 2024-10-21 21:33:20 | 2024-10-21 21:33:20 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int n,m,x,y;
int main(){
int cnt = 0;
cin>>n>>m;
while(1) {
string st;
for(int i = 0;i<cnt-1;i++) st.push_back('v');
for(int j = 0;j<m-1;j++) st.push_back('>');
cout << "? " << st << endl;
cin>>x>>y;
if(x!=cnt) {
cout << "! " << cnt << " " << 0 << endl;
return 0;
}
if(y!=m-1) {
cout << "! " << x << " " << y+1 << endl;
return 0;
}
cnt++;
}
}
/*
For C++ programs, first compile it (e.g. with g++ -g -O2 -std=gnu++17 -static
solution.cpp -o solution.out) and then run:
python3 testing_tool.py ./solution.out <<<"4 5 2 3"
/usr/bin/g++ -g -O2 -std=gnu++17 boxbrute.cpp -o solution.out
python3 testing_tool.py ./solution.out <<<"4 5 2 3"
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3752kb
input:
4 5 0 4 0 4
output:
? >>>> ? >>>> ! 1 0
result:
wrong answer expected (2,3) but got (1,0)