QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#664200#7156. Find the Boxpackmani#0 1ms3608kbC++14652b2024-10-21 19:35:262024-10-21 19:35:27

Judging History

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

  • [2024-10-21 19:35:27]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3608kb
  • [2024-10-21 19:35:26]
  • 提交

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