QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#488192 | #9156. 百万富翁 | huangzirui | 0 | 75ms | 31656kb | C++14 | 918b | 2024-07-23 17:53:51 | 2024-07-23 17:53:51 |
Judging History
answer
#include "richest.h"
#include<bits/stdc++.h>
using namespace std;
namespace sub1{
const int maxn=1010;
int n=1000;
vector<int>A,B;
int is[maxn][maxn];
int solve(int N){
n=N;
for(int i=0;i<n;i++)
for(int j=i+1;j<n;j++){
A.push_back(i);
B.push_back(j);
// cerr<<i<<' '<<j<<"|"<<n<<endl;
}
auto C=ask(A,B);int cnt=0;
for(int i=0;i<n;i++)
for(int j=i+1;j<n;j++){
is[i][j]=(C[cnt++]==i);
is[j][i]=1-is[i][j];
}
for(int i=0;i<n;i++){
bool flg=true;
for(int j=0;j<n;j++)
if(i!=j && !is[i][j])flg=false;
if(flg)return i;
}
assert(0);
}
}
int richest(int N, int T, int S) {
if(N<=1000)return sub1::solve(N);
return 1;
}
詳細信息
Pretests
Pretest #1:
score: 0
Wrong Answer
time: 75ms
memory: 31656kb
input:
1000 1 499500 957319859
output:
Too many total elements in queries 1469670942222006797 0.000000 6906350380861515327
result:
points 0.0 Too many total elements in queries
Pretest #2:
score: 0
Wrong Answer
time: 13ms
memory: 25336kb
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: 65ms
memory: 31328kb
input:
1000 1 499500 957319857
output:
Too many total elements in queries 1469670942222006797 0.000000 6906350380861515327
result:
points 0.0 Too many total elements in queries
Test #2:
score: 0
Wrong Answer
time: 17ms
memory: 23940kb
input:
1000000 20 2000000 29091471
output:
Wrong answer 4459638610240858557 0.000000 6906350380861515327
result:
points 0.0 Wrong answer