QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#544083#9156. 百万富翁jay_jayjay#15 637ms23428kbC++17509b2024-09-02 03:57:472024-09-02 03:57:47

Judging History

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

  • [2024-09-02 03:57:47]
  • 评测
  • 测评结果:15
  • 用时:637ms
  • 内存:23428kb
  • [2024-09-02 03:57:47]
  • 提交

answer

#include "richest.h"


#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()

int richest(int N, int T, int S) {
        if(N<=1000) {
                vector<int> a,b;
                vector<int> occ(N);
                for(int i=0;i<N;i++)for(int j=i+1;j<N;j++) a.push_back(i),b.push_back(j);
                auto res = ask(a,b);
                for(auto x:res)occ[x]++;
                return max_element(all(occ)) - occ.begin();
        }
        return 1;
}

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

score: 15
Accepted
time: 611ms
memory: 21836kb

input:

1000 1 499500 957319859

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Pretest #2:

score: 0
Wrong Answer
time: 18ms
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: 637ms
memory: 23060kb

input:

1000 1 499500 957319857

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Test #2:

score: 0
Wrong Answer
time: 10ms
memory: 23428kb

input:

1000000 20 2000000 29091471

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer