QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#507263 | #7156. Find the Box | monster_hunter | WA | 1ms | 3944kb | C++14 | 581b | 2024-08-06 14:55:48 | 2024-08-06 14:55:49 |
Judging History
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;
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: 3808kb
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: 3864kb
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: 3908kb
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: 3944kb
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: 0
Accepted
time: 1ms
memory: 3860kb
input:
2 50 1 13 1 11
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 #6:
score: 0
Accepted
time: 1ms
memory: 3860kb
input:
50 2 46 0 47 0
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^>v<v^>v<v^>v<v^>v<v^>v<v^>v<v^>v<v^>v< ? vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv...
result:
points 1.0 1.0 used 2 queried; score: 100.00
Test #7:
score: 0
Accepted
time: 1ms
memory: 3804kb
input:
1 2 0 0 0 0
output:
? ^>v< ? v> ! 0 1
result:
points 1.0 1.0 used 2 queried; score: 100.00
Test #8:
score: 0
Accepted
time: 0ms
memory: 3864kb
input:
1 3 0 0 0 0
output:
? ^>v^>v<< ? v>> ! 0 1
result:
points 1.0 1.0 used 2 queried; score: 100.00
Test #9:
score: 0
Accepted
time: 0ms
memory: 3768kb
input:
1 3 0 0 0 1
output:
? ^>v^>v<< ? v>> ! 0 2
result:
points 1.0 1.0 used 2 queried; score: 100.00
Test #10:
score: 0
Accepted
time: 1ms
memory: 3788kb
input:
1 4 0 0 0 0
output:
? ^>v^>v^>v<<< ? v>>> ! 0 1
result:
points 1.0 1.0 used 2 queried; score: 100.00
Test #11:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
1 4 0 0 0 1
output:
? ^>v^>v^>v<<< ? v>>> ! 0 2
result:
points 1.0 1.0 used 2 queried; score: 100.00
Test #12:
score: 0
Accepted
time: 1ms
memory: 3788kb
input:
1 4 0 0 0 2
output:
? ^>v^>v^>v<<< ? v>>> ! 0 3
result:
points 1.0 1.0 used 2 queried; score: 100.00
Test #13:
score: 0
Accepted
time: 1ms
memory: 3792kb
input:
2 1 0 0 0 0
output:
? v ? v ! 1 0
result:
points 1.0 1.0 used 2 queried; score: 100.00
Test #14:
score: -100
Wrong Answer
time: 1ms
memory: 3872kb
input:
2 2 1 0 1 1
output:
? ^>v<v^>v< ? vv> ! 2 0
result:
wrong answer expected (0,1) but got (2,0)