QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#507588#9156. 百万富翁lin199112215 624ms25392kbC++14596b2024-08-06 19:34:062024-08-06 19:34:07

Judging History

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

  • [2024-08-06 19:34:07]
  • 评测
  • 测评结果:15
  • 用时:624ms
  • 内存:25392kb
  • [2024-08-06 19:34:06]
  • 提交

answer

#include<bits/stdc++.h>
#include "richest.h"
using namespace std;
const int N=1e6+3;
bitset<N>vis;
int richest(int n,int t,int s){
    if(t==1){
        for(int i=0;i<n;++i)vis[i]=0;
        vector<int>q1,q2;
        for(int i=0;i<n;++i)
            for(int j=i+1;j<n;++j)
                q1.push_back(i),q2.push_back(j);   
        vector<int>res=ask(q1,q2);
        int len=q1.size();
        for(int i=0;i<len;++i)
            if(res[i]==q1[i])vis[q2[i]]=1;
            else vis[q1[i]]=1;
        for(int i=0;i<n;++i)
            if(!vis[i])return i;
    }
    return 1;
}

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

score: 15
Accepted
time: 613ms
memory: 25392kb

input:

1000 1 499500 957319859

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Pretest #2:

score: 0
Wrong Answer
time: 13ms
memory: 23400kb

input:

1000000 20 2000000 29091473

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer


Final Tests

Test #1:

score: 15
Accepted
time: 624ms
memory: 25288kb

input:

1000 1 499500 957319857

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Test #2:

score: 0
Wrong Answer
time: 17ms
memory: 23432kb

input:

1000000 20 2000000 29091471

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer