QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#664684#7156. Find the BoxWarinchai_s#WA 0ms3640kbC++14640b2024-10-21 21:44:342024-10-21 21:44:34

Judging History

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

  • [2024-10-21 21:44:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3640kb
  • [2024-10-21 21:44:34]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int h,w;cin>>h>>w;
    int x=0,y=0;
    for(int i=0;i<h;i++){
        cout<<"? ";
        for(int j=0;j<i;j++){
            cout<<"v";
        }
        for(int j=0;j<w;j++){
            cout<<">";
        }
        cout<<endl;
        int r,c;cin>>r>>c;
        if(r!=i){
            y=0,x=i;
            break;
        }
        if(c!=w-1){
            y=c+1;
            x=i;
            break;
        }
    }
    cout<<"! "<<x<<' '<<y+1<<endl;
}
/*
4 5
1
1 1
1 1 1
4
4 4
4 4 4

*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3640kb

input:

4 5
0 4
1 4
2 2

output:

? >>>>>
? v>>>>>
? vv>>>>>
! 2 4

result:

wrong answer expected (2,3) but got (2,4)