QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#488192#9156. 百万富翁huangzirui0 75ms31656kbC++14918b2024-07-23 17:53:512024-07-23 17:53:51

Judging History

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

  • [2024-07-23 17:53:51]
  • 评测
  • 测评结果:0
  • 用时:75ms
  • 内存:31656kb
  • [2024-07-23 17:53:51]
  • 提交

answer

#include "richest.h"
#include<bits/stdc++.h>
using namespace std;

namespace sub1{
    const int maxn=1010;
    int n=1000;
    vector<int>A,B;
    int is[maxn][maxn];
    int solve(int N){
        n=N;
        for(int i=0;i<n;i++)
            for(int j=i+1;j<n;j++){
                A.push_back(i);
                B.push_back(j);
                // cerr<<i<<' '<<j<<"|"<<n<<endl;
            }
        auto C=ask(A,B);int cnt=0;
        for(int i=0;i<n;i++)
            for(int j=i+1;j<n;j++){
                is[i][j]=(C[cnt++]==i);
                is[j][i]=1-is[i][j];
            }
        for(int i=0;i<n;i++){
            bool flg=true;
            for(int j=0;j<n;j++)
                if(i!=j && !is[i][j])flg=false;
            if(flg)return i;
        }
        assert(0);
    }
}

int richest(int N, int T, int S) {
    if(N<=1000)return sub1::solve(N);
    return 1;
}

详细


Pretests

Pretest #1:

score: 0
Wrong Answer
time: 75ms
memory: 31656kb

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
Wrong Answer
time: 13ms
memory: 25336kb

input:

1000000 20 2000000 29091473

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer


Final Tests

Test #1:

score: 0
Wrong Answer
time: 65ms
memory: 31328kb

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
Wrong Answer
time: 17ms
memory: 23940kb

input:

1000000 20 2000000 29091471

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer