QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#616757 | #7334. Endgame | erering | WA | 0ms | 3512kb | C++20 | 1.1kb | 2024-10-06 11:11:45 | 2024-10-06 11:11:46 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define endl '\n'
#define int long long
const int N=1e5+5,MOD=325235241211,inf=2e18;
signed main() {
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
srand(1298659691);
int n; cin>>n;
map<pair<int,int>,bool> mp;
int x1,y1,x2,y2; cin>>x1>>y1>>x2>>y2;
bool flag=0;
pair<int,int> a[n+1];
a[n]={0,0};
mp[{0,0}]=1;
for(int i=0;i<n;i++){
cin>>a[i].first>>a[i].second;
int x=a[i].first,y=a[i].second;
mp[{x,y}]=1;
if(mp[{x2-(x1+x),y2-(y+y1)}])flag=1;
}
if(flag){
cout<<"Alice wins";
}
else{
for(int j=0;j<8000000;j++){
int a1=rand()%n+1,b1=rand()%n+1;
flag=0;
for(int i=0;i<=n;i++){
int x=a[i].first,y=a[i].second;
if(mp[{a1-(x2+x),b1-(y+y2)}]){
flag=1;
break;
}
}
if(!flag){
cout<<"tie "<<a1<<" "<<b1;
return 0;
}
}
cout<<"Bob wins";
}
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3512kb
input:
2 ........ ........ ........ ........ ........ .......W R....... .......B ....B... ........ ..W..... ........ .....R.. ........ ........ ........
output:
tie 1 1
result:
wrong output format Expected integer, but "tie" found