QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#616757#7334. EndgameereringWA 0ms3512kbC++201.1kb2024-10-06 11:11:452024-10-06 11:11:46

Judging History

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

  • [2024-10-06 11:11:46]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3512kb
  • [2024-10-06 11:11:45]
  • 提交

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";
    }
}

Details

Tip: Click on the bar to expand more detailed information

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