QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#616754#7334. EndgameereringWA 1ms3492kbC++201.1kb2024-10-06 11:10:222024-10-06 11:10:23

Judging History

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

  • [2024-10-06 11:10:23]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3492kb
  • [2024-10-06 11:10:22]
  • 提交

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: 1ms
memory: 3492kb

input:

2
........
........
........
........
........
.......W
R.......
.......B

....B...
........
..W.....
........
.....R..
........
........
........


output:

tie 1 1

result:

wrong output format Expected integer, but "tie" found