QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#502314#9156. 百万富翁nhuang685#0 0ms23760kbC++20526b2024-08-03 03:34:172024-08-03 03:34:18

Judging History

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

  • [2024-08-03 03:34:18]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:23760kb
  • [2024-08-03 03:34:17]
  • 提交

answer

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

int richest(int N, int T, int S) {
    std::vector<int> a, b;
    for (int i = 0; i < N; ++i) {
        for (int j = 1; j < N; ++j) {
            a.push_back(i);
            b.push_back(j);
        }
    }
    std::vector<int> res = ask(a, b);
    std::vector<int> cnt(N);
    for (int i = 0; i < N; ++i) {
        ++cnt[res[i]];
    }
    for (int i = 0; i < N; ++i) {
        if (cnt[i] == N) {
            return i;
        }
    }
    assert(false);
}

详细


Pretests

Pretest #1:

score: 0
Wrong Answer
time: 0ms
memory: 23684kb

input:

1000 1 499500 957319859

output:

Too many total elements in queries
1469670942222006797
0.000000
6906350380861515327

result:

points 0.0 Too many total elements in queries

Pretest #2:

score: 0
Memory Limit Exceeded

input:

1000000 20 2000000 29091473

output:

Unauthorized output

result:



Final Tests

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 23760kb

input:

1000 1 499500 957319857

output:

Too many total elements in queries
1469670942222006797
0.000000
6906350380861515327

result:

points 0.0 Too many total elements in queries

Test #2:

score: 0
Memory Limit Exceeded

input:

1000000 20 2000000 29091471

output:

Unauthorized output

result: