QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#492209 | #9156. 百万富翁 | Erinyes# | 15 | 617ms | 62516kb | C++14 | 469b | 2024-07-26 10:28:07 | 2024-07-26 10:28:08 |
Judging History
answer
#include<bits/stdc++.h>
#include "richest.h"
using namespace std;
int id[1005][1005];
int richest(int n, int T, int S){
if(n==1000){
vector<int>A,B;
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
id[i][j]=A.size(),A.push_back(i),B.push_back(j);
}
}
auto C=ask(A,B);
for(int i=0;i<n;i++){
bool tag=1;
for(int j=0;j<i;j++)if(C[id[j][i]]!=i)tag=0;
for(int j=i+1;j<n;j++)if(C[id[i][j]]!=i)tag=0;
if(tag)return i;
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Pretests
Pretest #1:
score: 15
Accepted
time: 617ms
memory: 29916kb
input:
1000 1 499500 957319859
output:
Correct 7127326332295218295 1.000000 1331569654267968081
result:
points 1.0 Correct
Pretest #2:
score: 0
Wrong Answer
time: 90ms
memory: 62516kb
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: 616ms
memory: 31200kb
input:
1000 1 499500 957319857
output:
Correct 7127326332295218295 1.000000 1331569654267968081
result:
points 1.0 Correct
Test #2:
score: 0
Wrong Answer
time: 82ms
memory: 62320kb
input:
1000000 20 2000000 29091471
output:
Wrong answer 4459638610240858557 0.000000 6906350380861515327
result:
points 0.0 Wrong answer