QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#507278#7156. Find the Boxmonster_hunterWA 1ms3936kbC++14599b2024-08-06 15:10:192024-08-06 15:10:21

Judging History

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

  • [2024-08-06 15:10:21]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3936kb
  • [2024-08-06 15:10:19]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define f fflush(stdout)
LL n,i,j,k,m,x,y;
int main(){
	scanf("%lld%lld",&n,&m);
	printf("? ");
	for(i=1;i<=n;i++){
		for(j=2;j<=m;j++){
			printf("^>v");
		}
		for(j=2;j<=m;j++)
		  printf("<");
		if(i!=n) printf("v");
	}
	printf("\n");
	f;
	scanf("%lld%lld",&x,&y);
	x+=2;
	if(x==n+1) x=1;
	printf("? ");
	for(i=1;i<x;i++)
	  printf("v");
	for(i=1;i<m;i++)
	  printf(">");
	printf("\n");
	f;
	scanf("%lld%lld",&x,&y);
	if(y==m-1){
		x++,y=0;
	}
	else y++;
	printf("! %lld %lld",x,y);
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3892kb

input:

4 5
1 0
2 2

output:

? ^>v^>v^>v^>v<<<<v^>v^>v^>v^>v<<<<v^>v^>v^>v^>v<<<<v^>v^>v^>v^>v<<<<
? vv>>>>
! 2 3

result:

points 1.0 1.0 used 2 queried; score: 100.00

Test #2:

score: 0
Accepted
time: 1ms
memory: 3900kb

input:

5 4
2 0
3 1

output:

? ^>v^>v^>v<<<v^>v^>v^>v<<<v^>v^>v^>v<<<v^>v^>v^>v<<<v^>v^>v^>v<<<
? vvv>>>
! 3 2

result:

points 1.0 1.0 used 2 queried; score: 100.00

Test #3:

score: 0
Accepted
time: 1ms
memory: 3936kb

input:

50 49
47 0
48 47

output:

? ^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v...

result:

points 1.0 1.0 used 2 queried; score: 100.00

Test #4:

score: 0
Accepted
time: 0ms
memory: 3820kb

input:

49 50
47 0
48 48

output:

? ^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>...

result:

points 1.0 1.0 used 2 queried; score: 100.00

Test #5:

score: -100
Wrong Answer
time: 1ms
memory: 3916kb

input:

2 50
1 13
0 49

output:

? ^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>v^>...

result:

wrong answer expected (1,12) but got (1,0)