QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#740367#9156. 百万富翁piggy1230 56ms23352kbC++20552b2024-11-13 09:23:362024-11-13 09:23:36

Judging History

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

  • [2024-11-13 09:23:36]
  • 评测
  • 测评结果:0
  • 用时:56ms
  • 内存:23352kb
  • [2024-11-13 09:23:36]
  • 提交

answer

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

int richest(int N, int T, int S) {
	if (T==1){
		vector<int> vct1,vct2;
		for (ll i=0;i<N;i++){
			for (ll j=i+1;j<N;j++){
				vct1.push_back(i);
				vct2.push_back(j);
			}
		}
		vector<int> p=ask(vct1,vct2);
		for (ll i=0;i<N;i++){
			ll c=0;
			for (ll j=0;j<N;j++){
				if (i!=j){
					if (j<i){
						c+=p[j*N+i]==i;
					}else{
						c+=p[i*N+j]==i;
					}
				}
			}
			if (c==N-1){
				return i;
			}
		}
	}
    return 1;
}

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

score: 0
Wrong Answer
time: 56ms
memory: 20028kb

input:

1000 1 499500 957319859

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer

Pretest #2:

score: 0
Wrong Answer
time: 7ms
memory: 23352kb

input:

1000000 20 2000000 29091473

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer


Final Tests

Test #1:

score: 0
Wrong Answer
time: 56ms
memory: 20100kb

input:

1000 1 499500 957319857

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer

Test #2:

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

input:

1000000 20 2000000 29091471

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer