QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#499307 | #9156. 百万富翁 | cjwen | 15 | 616ms | 46952kb | C++14 | 921b | 2024-07-31 11:54:04 | 2024-07-31 11:54:04 |
Judging History
answer
#include<bits/stdc++.h>
#include "richest.h"
using namespace std;
int zans;
void doit1(vector<int> tp){
int n = tp.size();
vector<int> a, b;
for(int i = 0; i < n; i++){
for(int j = 0; j < i; j++){
a.push_back(i);
b.push_back(j);
}
}
vector<int> c = ask(a, b);
vector<bool> d(n, 1);
int ccnt = 0;
for(int i = 0; i < n; i++){
for(int j = 0; j < i; j++){
if(c[ccnt++] == i){
d[j] = 0;
}else{
d[i] = 0;
}
}
}
for(int i = 1; i < n; i++){
if(d[i]){
zans = i;
}
}
}
int richest(int N, int T, int S) {
if(N == 1000){
vector<int> tp;
for(int i = 0; i < N; i++){
tp.push_back(i);
}
doit1(tp);
return zans;
}
return zans;
}
详细
Pretests
Pretest #1:
score: 15
Accepted
time: 616ms
memory: 24284kb
input:
1000 1 499500 957319859
output:
Correct 7127326332295218295 1.000000 1331569654267968081
result:
points 1.0 Correct
Pretest #2:
score: 0
Wrong Answer
time: 19ms
memory: 46912kb
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: 615ms
memory: 22904kb
input:
1000 1 499500 957319857
output:
Correct 7127326332295218295 1.000000 1331569654267968081
result:
points 1.0 Correct
Test #2:
score: 0
Wrong Answer
time: 7ms
memory: 46952kb
input:
1000000 20 2000000 29091471
output:
Wrong answer 4459638610240858557 0.000000 6906350380861515327
result:
points 0.0 Wrong answer