QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#507912 | #7156. Find the Box | Crysfly | WA | 1ms | 3792kb | C++17 | 1.3kb | 2024-08-06 23:25:33 | 2024-08-06 23:25:34 |
Judging History
answer
// what is matter? never mind.
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2")
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define int long long
#define ull unsigned long long
#define SZ(x) ((int)((x).size()))
#define ALL(x) (x).begin(),(x).end()
using namespace std;
inline int read()
{
char c=getchar();int x=0;bool f=0;
for(;!isdigit(c);c=getchar())f^=!(c^45);
for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
if(f)x=-x;return x;
}
#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;
#define maxn 500006
#define inf 0x3f3f3f3f
int n,m;
void out(int x,int y){
cout<<"! "<<x<<" "<<y<<endl;
exit(0);
}
signed main()
{
cin>>n>>m;
string s;
For(i,1,n) s+='v';
For(i,1,m) s+='>';
cout<<"? "<<s<<endl;
int x,y; cin>>x>>y;
if(x!=n || y!=m){
if(x!=n) out(x+1,0);
else assert(y!=m),out(n-1,y+1);
}
s="";
For(i,1,n) s+='v';
For(j,1,m-1){
s+='>';
For(i,1,n)s+='^';
s+="<^>";
if(j<m-1){
For(i,1,n)s+='v';
}
}
cout<<"? "<<s<<endl;
cin>>x>>y;
cout<<"! "<<x<<" "<<y+1<<endl;
return 0;
}
/*
*/
詳細信息
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3792kb
input:
4 5 3 4
output:
? vvvv>>>>> ! 4 0
result:
wrong answer expected (2,3) but got (4,0)