QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#505280#9156. 百万富翁Ecrade_15 623ms25300kbC++14464b2024-08-05 00:38:422024-08-05 00:38:42

Judging History

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

  • [2024-08-05 00:38:42]
  • 评测
  • 测评结果:15
  • 用时:623ms
  • 内存:25300kb
  • [2024-08-05 00:38:42]
  • 提交

answer

#include "richest.h"
#include <bits/stdc++.h>
using namespace std; 
int richest(int n,int t,int s){
	if (n == 1000){
		int cnt[1009];
		for (int i = 0;i < n;i += 1) cnt[i] = 0;
		vector <int> a,b,c;
		for (int i = 0;i < n;i += 1) for (int j = i + 1;j < n;j += 1) a.emplace_back(i),b.emplace_back(j);
		c = ask(a,b);
		for (int i = 0;i < c.size();i += 1) cnt[c[i]] += 1;
		for (int i = 0;i < n;i += 1) if (cnt[i] == n - 1) return i;
	}
    return 1;
}

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

score: 15
Accepted
time: 623ms
memory: 25300kb

input:

1000 1 499500 957319859

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Pretest #2:

score: 0
Wrong Answer
time: 12ms
memory: 23352kb

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: 617ms
memory: 25280kb

input:

1000 1 499500 957319857

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Test #2:

score: 0
Wrong Answer
time: 8ms
memory: 23296kb

input:

1000000 20 2000000 29091471

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer