QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#872067#8619. Interactive Casinoucup-team1134#WA 1ms3456kbC++232.8kb2025-01-25 23:30:252025-01-25 23:30:36

Judging History

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

  • [2025-01-25 23:30:36]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3456kb
  • [2025-01-25 23:30:25]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pair<int,int>>
#define vll vector<pair<ll,ll>>
#define vvi vector<vector<int>>
#define vvl vector<vector<ll>>
#define vvii vector<vector<pair<int,int>>>
#define vvll vector<vector<pair<ll,ll>>>
#define vst vector<string>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define mkunique(x) sort(all(x));(x).erase(unique(all(x)),(x).end())
#define fi first
#define se second
#define mp make_pair
#define si(x) int(x.size())
const int mod=998244353,MAX=300005,INF=15<<26;

int main(){
    
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    
    int N;cin>>N;
    vi ask;
    for(int i=0;i<25000/N;i++){
        int a=rng()%N;if(a<0) a+=N;
        ask.pb(a);
    }
    
    vvl S(N);
    auto f=[&](int a,int b){
        if(a==b) return 0;
        cout<<a+1<<" "<<b+1<<endl;
        int re;cin>>re;
        return re;
    };
    
    for(int u:ask){
        for(int i=0;i<N;i++){
            int s=f(u,i);
            if(s==0&&u!=i){
                exit(0);
            }
            S[i].pb(s);
        }
    }
    
    for(int i=0;i<N;i++){
        for(int j=i+1;j<N;j++){
            if(S[i]==S[j]){
                f(i,j);
            }
        }
    }
    
    /*
    int N=1000;
    int OK=0,NG=0;
    for(int q=0;q<1000;q++){
        vector<ll> X(N);
        for(int i=0;i<N-1;i++){
            ll z=rng()%(1LL<<50);
            if(z<0) z+=(1LL<<50);
            X[i]=z;
        }
        X.back()=X[N-2];
        shuffle(all(X),rng);
        
        vi ask;
        for(int i=0;i<25;i++){
            int a=rng()%N;if(a<0) a+=N;
            ask.pb(a);
        }
        
        vvl S(N);
        auto f=[&](int a,int b){
            int re=0;
            for(int i=0;i<50;i++){
                if((X[a]&(1LL<<i))==(X[b]&(1LL<<i))) re++;
            }
            return re;
        };
        
        bool ok=false;
        
        for(int u:ask){
            for(int i=0;i<N;i++){
                int s=f(u,i);
                if(s==0) ok=true;
                S[i].pb(s);
            }
        }
        int ic=0;
        for(int i=0;i<N;i++){
            for(int j=i+1;j<N;j++){
                if(S[i]==S[j]) ic++;
            }
        }
        if(ic==1) ok=true;
        cout<<ic<<" ";
        if(ok) OK++;
        else NG++;
        
        cout<<OK<<" "<<NG<<endl;
    }
     */
}



Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3456kb

input:

5
ROUND 1000 43

output:

3 1

result:

wrong answer Token "3" doesn't correspond to pattern "PLAY|SKIP"