QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#507912#7156. Find the BoxCrysflyWA 1ms3792kbC++171.3kb2024-08-06 23:25:332024-08-06 23:25:34

Judging History

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

  • [2024-08-06 23:25:34]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3792kb
  • [2024-08-06 23:25:33]
  • 提交

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)