QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#502692#9156. 百万富翁liaoji15 621ms58500kbC++14699b2024-08-03 11:47:552024-08-03 11:47:55

Judging History

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

  • [2024-08-03 11:47:55]
  • 评测
  • 测评结果:15
  • 用时:621ms
  • 内存:58500kb
  • [2024-08-03 11:47:55]
  • 提交

answer

#include"richest.h"
#include<bits/stdc++.h>
using namespace std;
bool vis[1002];

int richest(int N,int T,int S) {
    if(N==1000) {
        memset(vis,0,sizeof vis);
        vector<int>a,b,ans;
        for(int i=0;i<N;i++)
            for(int j=i+1;j<N;j++)
                a.push_back(i),b.push_back(j);
        ans=ask(a,b);
        int ij=0;
        for(int i=0;i<N;i++)
            for(int j=i+1;j<N;j++)
                {
                    if(ans[ij]==i) vis[j]=1;
                    else vis[i]=1;
                    ++ij;
                }
        for(int i=0;i<N;i++) if(!vis[i]) return i;
    }

}
//g++ grader.cpp richest.cpp -o richest -O2 -std=c++14 -static

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

score: 15
Accepted
time: 621ms
memory: 25372kb

input:

1000 1 499500 957319859

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Pretest #2:

score: 0
Wrong Answer
time: 94ms
memory: 58500kb

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: 608ms
memory: 25200kb

input:

1000 1 499500 957319857

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Test #2:

score: 0
Wrong Answer
time: 87ms
memory: 58328kb

input:

1000000 20 2000000 29091471

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer