QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#664697#7156. Find the Boxnjoop#WA 0ms3592kbC++17814b2024-10-21 21:49:092024-10-21 21:49:09

Judging History

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

  • [2024-10-21 21:49:09]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3592kb
  • [2024-10-21 21:49:09]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

int h, w, x, y;

int main() {
    cin >> h >> w;
    string s;
    for(int i=1; i<=200; i++) {
        s.append("<^");
    }
    cout << "? " << s << endl;
    cin >> x >> y;
    for(int i=0; i<w-1; i++) {
        s = "";
        for(int j=0; j<h-1; j++) {
            s.append(i%2 ? "^" : "v");
        }
        s.append("<");
        cout << "? " << s << endl;
        cin >> x >> y;
        if(i%2 == 0 && x != h-1) {
            cout << "! " << x+1 << " " << y;
            return 0;
        }
        if(i%2 == 1 && x != 0) {
            cout << "! " << x-1 << " " << y;
            return 0;
        }
        if(y != i+1) {
            cout << "! " << x << " " << y+1;
            return 0;
        }
    }
    return 0;
}

详细

Test #1:

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

input:

4 5
0 0
3 0

output:

? <^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^...

result:

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