QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#502015#9156. 百万富翁maxrgby#0 5865ms106788kbC++14705b2024-08-03 00:31:252024-08-03 00:31:26

Judging History

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

  • [2024-08-03 00:31:26]
  • 评测
  • 测评结果:0
  • 用时:5865ms
  • 内存:106788kb
  • [2024-08-03 00:31:25]
  • 提交

answer

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

int richest(int n, int t, int s) {
	set<int> nums;
	for(int i = 0;i < n;i++){
		nums.insert(i);
	}
	vector<int> a,b,c;
	while(t--){
		a.clear();
		b.clear();
		c.clear();
		int i = 0;
		for(auto it = nums.begin();it != nums.end();it++,i++){
			if(i&1){
				b.push_back(*it);
			}else{
				a.push_back(*it);
			}
		}
		if(a.size() != b.size()){
			b.push_back({*nums.rbegin()});
		}
		c = ask(a,b);
		nums.clear();
		for(auto i : c){
			nums.insert(i);
		}
		cout << endl;
	}
    return *nums.begin();
}

// int main(){
// 	int n,t,s;
// 	cin >> n >> t >> s;
// 	cout << richest(n,t,s) << endl;
// }

详细


Pretests

Pretest #1:

score: 0
Wrong Answer
time: 1ms
memory: 8020kb

input:

1000 1 499500 957319859

output:

Unauthorized output

result:

points 0.0 Invalid signature

Pretest #2:

score: 0
Wrong Answer
time: 5831ms
memory: 106788kb

input:

1000000 20 2000000 29091473

output:

Unauthorized output

result:

points 0.0 Invalid signature


Final Tests

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 8068kb

input:

1000 1 499500 957319857

output:

Unauthorized output

result:

points 0.0 Invalid signature

Test #2:

score: 0
Wrong Answer
time: 5865ms
memory: 104764kb

input:

1000000 20 2000000 29091471

output:

Unauthorized output

result:

points 0.0 Invalid signature