QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#664629#7156. Find the Boxnjoop#WA 0ms3572kbC++17999b2024-10-21 21:29:302024-10-21 21:29:31

Judging History

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

  • [2024-10-21 21:29:31]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3572kb
  • [2024-10-21 21:29:30]
  • 提交

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<=h; i++) {
        s.append("<");
    }
    for(int i=1; i<=w; i++) {
        s.append("^");
    }
    cout << "? " << s << endl;
    cin >> x >> y;
    if(y != 0) {
        cout << "! " << x << " " << y-1; 
        return 0;
    }
    if(x != 0) {
        cout << "! " << x-1 << " " << y;
        return 0;
    }
    s = "";
    for(int i=1; i<=w; i+= 2) {
        for(int j=1; j<=h; j++) {
            s.append("v");
        }
        s.append(">");
        for(int j=1; j<=h; j++) {
            s.append("^");
        }
        s.append(">");
    }
    cout << "? " << s << endl;
    cin >> x >> y;
    if(x == 0 || x == h-1) {
        cout << "! " << x << " " << y+1 << "\n";
    }
    if(y%2 == 0) {
        cout << "! " << x+1 << " " << y; 
    } else {
        cout << "! " << x-1 << " " << y;
    }
    return 0;
}

详细

Test #1:

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

input:

4 5
0 0
0 4

output:

? <<<<^^^^^
? vvvv>^^^^>vvvv>^^^^>vvvv>^^^^>
! 0 5
! 1 4

result:

wrong answer expected (2,3) but got (0,5)