QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#664377 | #7156. Find the Box | Namkhing# | TL | 0ms | 0kb | C++14 | 665b | 2024-10-21 20:22:27 | 2024-10-21 20:22:31 |
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
cout << "?";
for (int i = 1; i <= n; i++) {
cout << "v";
}
int x, y;
cin >> x >> y;
if (x != n - 1) {
cout << "! " << x + 1 << " " << y;
return 0;
}
for (int i = 1; i <= n; i++) {
cout << "?";
for (int j = 2; j <= i; j++) {
cout << "v";
}
for (int j = 1; j <= m; j++) {
cout << ">";
}
cin >> x >> y;
if (y != m - 1) {
cout << "! " << x << " " << y + 1;
return 0;
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Time Limit Exceeded
input:
4 5
output:
?vvvv