QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#527185#9156. 百万富翁kymmykym#11.00002 2356ms99412kbC++14552b2024-08-22 11:33:592024-08-22 11:33:59

Judging History

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

  • [2024-08-22 11:33:59]
  • 评测
  • 测评结果:11.00002
  • 用时:2356ms
  • 内存:99412kb
  • [2024-08-22 11:33:59]
  • 提交

answer

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

typedef pair<int,int>pi;
int richest(int n, int T, int S){
	vector<int> vec;
	for(int i=0;i<n;i++){
		vec.push_back(i);
	}
	while(vec.size()>1){
		vector<int> A, B;
		vector<int>nvec;
		for(int i=0;i<(int)vec.size()-1;i+=2){
			A.push_back(vec[i]);
			B.push_back(vec[i+1]);
		}
		if((int)vec.size() % 2 == 1){
			nvec.push_back(vec.back());//bye
		}
		vector<int>res=ask(A,B);
		for(auto x:res){
			nvec.push_back(x);
		}
		vec=nvec;
	}
	return vec[0];
}

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

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

input:

1000 1 499500 957319859

output:

Too many queries
1294109832092195181
0.000000
6906350380861515327

result:

points 0.0 Too many queries

Pretest #2:

score: 11
Acceptable Answer
time: 2356ms
memory: 99412kb

input:

1000000 20 2000000 29091473

output:

Partially correct Case 2, 11 / 85, maxt = 20, maxs = 999999
1811468636458994965
0.129412
3823502568050958645

result:

points 0.129412 Partially correct Case 2, 11 / 85, maxt = 20, maxs = 999999


Final Tests

Test #1:

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

input:

1000 1 499500 957319857

output:

Too many queries
1294109832092195181
0.000000
6906350380861515327

result:

points 0.0 Too many queries

Test #2:

score: 11
Acceptable Answer
time: 2352ms
memory: 99244kb

input:

1000000 20 2000000 29091471

output:

Partially correct Case 2, 11 / 85, maxt = 20, maxs = 999999
1811468636458994965
0.129412
3823502568050958645

result:

points 0.129412 Partially correct Case 2, 11 / 85, maxt = 20, maxs = 999999