QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#527087#9156. 百万富翁TheRaptor15 626ms25380kbC++17397b2024-08-22 09:57:052024-08-22 09:57:06

Judging History

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

  • [2024-08-22 09:57:06]
  • 评测
  • 测评结果:15
  • 用时:626ms
  • 内存:25380kb
  • [2024-08-22 09:57:05]
  • 提交

answer

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

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

score: 15
Accepted
time: 618ms
memory: 25380kb

input:

1000 1 499500 957319859

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Pretest #2:

score: 0
Runtime Error

input:

1000000 20 2000000 29091473

output:

Unauthorized output

result:



Final Tests

Test #1:

score: 15
Accepted
time: 626ms
memory: 25216kb

input:

1000 1 499500 957319857

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Test #2:

score: 0
Runtime Error

input:

1000000 20 2000000 29091471

output:

Unauthorized output

result: