QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#498228#9156. 百万富翁biuld#0 16ms24188kbC++14538b2024-07-30 09:17:182024-07-30 09:17:18

Judging History

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

  • [2024-07-30 09:17:18]
  • 评测
  • 测评结果:0
  • 用时:16ms
  • 内存:24188kb
  • [2024-07-30 09:17:18]
  • 提交

answer

#include "richest.h"
#include<bits/stdc++.h>
using namespace std;
const int N = 1e3;

vector<int> a, b, c;
bool w[N + 5][N + 5];

int richest(int n, int t, int s){
	if(t == 1){
		for(int i = 1; i <= n; ++ i){
			for(int j = i + 1; j <= n; ++ j){
				a.push_back(i);
				b.push_back(j);
			}
		}
		c = ask(a, b);
		for(int i = 0; i < c.size(); ++ i){
			w[a[i]][b[i]] = w[b[i]][a[i]] = c[i];
		}
		int now = 1;
		for(int i = 2; i <= n; ++ i){
			if(w[now][i] == i) now = i;
		}
		return now;
	}
    return 1;
}

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

score: 0
Wrong Answer
time: 3ms
memory: 15164kb

input:

1000 1 499500 957319859

output:

Index out of bounds
9775460264716263939
0.000000
6906350380861515327

result:

points 0.0 Index out of bounds

Pretest #2:

score: 0
Wrong Answer
time: 16ms
memory: 23312kb

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: 8ms
memory: 15088kb

input:

1000 1 499500 957319857

output:

Index out of bounds
9775460264716263939
0.000000
6906350380861515327

result:

points 0.0 Index out of bounds

Test #2:

score: 0
Wrong Answer
time: 16ms
memory: 24188kb

input:

1000000 20 2000000 29091471

output:

Wrong answer
4459638610240858557
0.000000
6906350380861515327

result:

points 0.0 Wrong answer