QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#499307#9156. 百万富翁cjwen15 616ms46952kbC++14921b2024-07-31 11:54:042024-07-31 11:54:04

Judging History

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

  • [2024-07-31 11:54:04]
  • 评测
  • 测评结果:15
  • 用时:616ms
  • 内存:46952kb
  • [2024-07-31 11:54:04]
  • 提交

answer

#include<bits/stdc++.h>
#include "richest.h"

using namespace std;

int zans;

void doit1(vector<int> tp){
    int n = tp.size();
    vector<int> a, b;
    for(int i = 0; i < n; i++){
        for(int j = 0; j < i; j++){
            a.push_back(i);
            b.push_back(j);
        }
    }
    vector<int> c = ask(a, b);
    vector<bool> d(n, 1);
    int ccnt = 0;
    for(int i = 0; i < n; i++){
        for(int j = 0; j < i; j++){
            if(c[ccnt++] == i){
                d[j] = 0;
            }else{
                d[i] = 0;
            }
        }
    }
    for(int i = 1; i < n; i++){
        if(d[i]){
            zans = i;
        }
    }
}

int richest(int N, int T, int S) {
    if(N == 1000){
        vector<int> tp;
        for(int i = 0; i < N; i++){
            tp.push_back(i);
        }
        doit1(tp);
        return zans;
    }
    return zans;
}

詳細信息


Pretests

Pretest #1:

score: 15
Accepted
time: 616ms
memory: 24284kb

input:

1000 1 499500 957319859

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Pretest #2:

score: 0
Wrong Answer
time: 19ms
memory: 46912kb

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: 615ms
memory: 22904kb

input:

1000 1 499500 957319857

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Test #2:

score: 0
Wrong Answer
time: 7ms
memory: 46952kb

input:

1000000 20 2000000 29091471

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer