QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#740574#9156. 百万富翁robertfan0 0ms21236kbC++14675b2024-11-13 10:34:482024-11-13 10:34:49

Judging History

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

  • [2024-11-13 10:34:49]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:21236kb
  • [2024-11-13 10:34:48]
  • 提交

answer

#include <bits/stdc++.h>
#include "richest.h"
using namespace std;
int mp[8]={1,183,3472,20832,62500,125000,250000,500000};
int ok[1000006];
int richest(int N,int T,int S){
    if(T==1){
        vector<int>a,b;
        for(int i=1;i<=N;i++){
            for(int j=i+1;j<=N;j++){
                a.push_back(i);
                b.push_back(j);
            }
        }
        memset(ok,0,sizeof(ok));
        vector<int>c=ask(a,b);
        for(int i=0;i<c.size();i++){
            ok[c[i]]++;
        }
        for(int i=1;i<=N;i++){
            if(ok[i]==N-1){
                return i;
            }
        }
    }
    memset(ok,0,sizeof(ok));
}

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

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

input:

1000 1 499500 957319859

output:

Index out of bounds
9775460264716263939
0.000000
6906350380861515327

result:

points 0.0 Index out of bounds

Pretest #2:

score: 0
Runtime Error

input:

1000000 20 2000000 29091473

output:

Unauthorized output

result:



Final Tests

Test #1:

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

input:

1000 1 499500 957319857

output:

Index out of bounds
9775460264716263939
0.000000
6906350380861515327

result:

points 0.0 Index out of bounds

Test #2:

score: 0
Runtime Error

input:

1000000 20 2000000 29091471

output:

Unauthorized output

result: