QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#664200 | #7156. Find the Box | packmani# | 0 | 1ms | 3608kb | C++14 | 652b | 2024-10-21 19:35:26 | 2024-10-21 19:35:27 |
answer
#include<bits/stdc++.h>
using namespace std;
//#define int long long int
void flush()
{
cout << '\n';
cout.flush();
}
int h,w,r,c;
string str;
int32_t main()
{
ios_base::sync_with_stdio(false); cin.tie(0);
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
cin >> h >> w;
for(int i=0;i<h;i++)
{
str="";
for(int j=0;j<i;j++)
str+='v';
for(int j=0;j<w;j++)
str+='>';
cout << "? " << str; flush();
cin >> r >> c;
if(r==i and c<w-1)
{
cout << "! " << r << ' ' << c+1; flush();
break;
}
if(r==i-1)
{
cout << "! " << i << ' ' << 0; flush();
break;
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Acceptable Answer
time: 1ms
memory: 3608kb
input:
4 5 0 4 1 4 2 2
output:
? >>>>> ? v>>>>> ? vv>>>>> ! 2 3
result:
points 0.820 0.82 used 3 queried; score: 82.00