QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#537598#9156. 百万富翁Nevll#15 632ms25328kbC++14741b2024-08-30 16:25:172024-08-30 16:25:17

Judging History

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

  • [2024-08-30 16:25:17]
  • 评测
  • 测评结果:15
  • 用时:632ms
  • 内存:25328kb
  • [2024-08-30 16:25:17]
  • 提交

answer

#include "richest.h"
# include <bits/stdc++.h>
# define ll long long
# define fi first
# define se second
# define pii pair<int, int>
using namespace std;

int richest(int N, int T, int S) {
    vector<int> as1, as2;
    vector<int> gt;
    as1.clear();
    as2.clear();
    for(int i=0;i<N-1;i++) {
        for(int k=i+1;k<N;k++) {
            as1.push_back(i);
            as2.push_back(k);
        }
    }
    gt = ask(as1, as2);
    vector<bool> pos(N + 1, 1);
    int v = 0;
    for(int i=0;i<N-1;i++) {
        for(int k=i+1;k<N;k++) {
            if(gt[v] == i) pos[k] = 0;
            else pos[i] = 0;
            v++;
        }
    }

    for(int i=0;i<N;i++) if(pos[i]) return i;
        return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

score: 15
Accepted
time: 618ms
memory: 25328kb

input:

1000 1 499500 957319859

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Pretest #2:

score: 0
Time Limit Exceeded

input:

1000000 20 2000000 29091473

output:

Unauthorized output

result:



Final Tests

Test #1:

score: 15
Accepted
time: 632ms
memory: 25180kb

input:

1000 1 499500 957319857

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Test #2:

score: 0
Memory Limit Exceeded

input:

1000000 20 2000000 29091471

output:

Unauthorized output

result: