QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#492170#9156. 百万富翁dyj133446#15 619ms25300kbC++14514b2024-07-26 10:07:212024-07-26 10:07:22

Judging History

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

  • [2024-07-26 10:07:22]
  • 评测
  • 测评结果:15
  • 用时:619ms
  • 内存:25300kb
  • [2024-07-26 10:07:21]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#include "richest.h"
bool vis[1005];
int richest(int N, int T, int S) {
	if(N<=1000)
	{
		memset(vis,0,sizeof(vis));
		vector<int>a,b,c;
		for(int i=0;i<N;i++)
		{
			for(int j=i+1;j<N;j++)a.emplace_back(i),b.emplace_back(j);
		}
		c=ask(a,b);
		int tot=0;
		for(int i=0;i<N;i++)
		{
			for(int j=i+1;j<N;j++)
			{
				if(c[tot]==i)vis[j]=1;
				else vis[i]=1;
				tot++;
			}
		}
		for(int i=0;i<N;i++)if(!vis[i])return i;
	}
    return 1;
}

详细


Pretests

Pretest #1:

score: 15
Accepted
time: 606ms
memory: 25300kb

input:

1000 1 499500 957319859

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Pretest #2:

score: 0
Wrong Answer
time: 12ms
memory: 23292kb

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: 619ms
memory: 25284kb

input:

1000 1 499500 957319857

output:

Correct
7127326332295218295
1.000000
1331569654267968081

result:

points 1.0 Correct

Test #2:

score: 0
Wrong Answer
time: 18ms
memory: 23336kb

input:

1000000 20 2000000 29091471

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer