QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#509838#9156. 百万富翁AdamGS#15 616ms23504kbC++23524b2024-08-08 19:05:542024-08-08 19:05:55

Judging History

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

  • [2024-08-08 19:05:55]
  • 评测
  • 测评结果:15
  • 用时:616ms
  • 内存:23504kb
  • [2024-08-08 19:05:54]
  • 提交

answer

#include "richest.h"
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
int solve1(int n) {
	vector<int>A, B;
	rep(i, n) rep(j, i) {
		A.pb(j); B.pb(i);
	}
	vector<int>C=ask(A, B);
	vector<int>ile(n);
	for(auto i : C) ++ile[i];
	int ans=-1;
	rep(i, n) if(ile[i]==n-1) ans=i;
	return ans;
}
int richest(int n, int t, int s) {
	if(t==1) return solve1(n);
	return 2137;
}

详细


Pretests

Pretest #1:

score: 15
Accepted
time: 603ms
memory: 22952kb

input:

1000 1 499500 957319859

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Pretest #2:

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

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: 616ms
memory: 22184kb

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: 23304kb

input:

1000000 20 2000000 29091471

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer