QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#664216#7156. Find the Boxpackmani#0 0ms3596kbC++14656b2024-10-21 19:38:562024-10-21 19:38:57

Judging History

你现在查看的是最新测评结果

  • [2024-10-21 19:38:57]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:3596kb
  • [2024-10-21 19:38:56]
  • 提交

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: 0ms
memory: 3596kb

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