QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#515930#9156. 百万富翁Chendaqian#15 622ms46896kbC++14406b2024-08-12 11:40:072024-08-12 11:40:08

Judging History

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

  • [2024-08-12 11:40:08]
  • 评测
  • 测评结果:15
  • 用时:622ms
  • 内存:46896kb
  • [2024-08-12 11:40:07]
  • 提交

answer

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

int richest(int N, int T, int S) {
	if(N==1000&&T==1&&S==499500) {
		vector<int> a,b;
		for(int i=0;i<N;i++) for(int j=i+1;j<N;j++) {
			a.emplace_back(i);
			b.emplace_back(j);
		}
		vector<int> c(ask(a,b)),cnt(N,0);
		for(auto p:c) cnt[p]++;
		for(int i=0;i<N;i++) if(cnt[i]==N-1) return i;
		return 0;
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

score: 15
Accepted
time: 622ms
memory: 25260kb

input:

1000 1 499500 957319859

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Pretest #2:

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

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: 613ms
memory: 25108kb

input:

1000 1 499500 957319857

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Test #2:

score: 0
Wrong Answer
time: 11ms
memory: 46896kb

input:

1000000 20 2000000 29091471

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer