QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#492213#9156. 百万富翁leihonglongyin#26.00002 2691ms99312kbC++14616b2024-07-26 10:30:132024-07-26 10:30:13

Judging History

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

  • [2024-07-26 10:30:13]
  • 评测
  • 测评结果:26.00002
  • 用时:2691ms
  • 内存:99312kb
  • [2024-07-26 10:30:13]
  • 提交

answer

#include "richest.h"
#include<bits/stdc++.h>
using namespace std;int cnt[1005];
int richest(int N,int T,int S){vector<int>now,a,b;
	if(T==1){memset(cnt,0,sizeof(cnt));
		for(int i=0;i<N;i++)for(int j=i+1;j<N;j++)a.push_back(i),b.push_back(j);
		now=ask(a,b);for(auto i:now)cnt[i]++;
		for(int i=0;i<N;i++)if(cnt[i]==N-1)return i;
	}
    for(int i=0;i<N;i++)now.push_back(i);
    while(now.size()>1){a.clear(),b.clear();int lst=0;
		for(int i=0;i+1<now.size();i+=2)a.push_back(now[i]),b.push_back(now[i+1]);
		if(now.size()&1)lst=now.back();
		now=ask(a,b);if(lst)now.push_back(lst);
	}return now[0];
}

详细


Pretests

Pretest #1:

score: 15
Accepted
time: 620ms
memory: 25268kb

input:

1000 1 499500 957319859

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Pretest #2:

score: 11
Acceptable Answer
time: 2640ms
memory: 99312kb

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: 15
Accepted
time: 612ms
memory: 25160kb

input:

1000 1 499500 957319857

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Test #2:

score: 11
Acceptable Answer
time: 2691ms
memory: 99252kb

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