QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#502685 | #9156. 百万富翁 | liaoji | 0 | 0ms | 0kb | C++14 | 660b | 2024-08-03 11:42:15 | 2024-08-03 11:42:15 |
answer
#include"richest.h"
#include<bits/stdc++.h>
using namespace std;
bool vis[1002];
int richest(int N,int T,int S) {
vector<int>a,b,ans;
if(N==1000) {
for(int i=0;i<N;i++)
for(int j=i+1;j<N;j++)
a.push_back(i),b.push_back(j);
ans=ask(a,b);
int ij=0;
for(int i=0;i<N;i++)
for(int j=i+1;j<N;j++)
{
if(ans[ij]==i) vis[j]=1;
else vis[i]=1;
++ij;
}
for(int i=0;i<N;i++) if(!vis[i]) return i;
}
}
//g++ grader.cpp richest.cpp -o richest -O2 -std=c++14 -static
Details
Tip: Click on the bar to expand more detailed information
Pretests
Pretest #1:
score: 0
Runtime Error
input:
1000 1 499500 957319859
output:
Unauthorized output
result:
Pretest #2:
score: 0
Runtime Error
input:
1000000 20 2000000 29091473
output:
Unauthorized output
result:
Final Tests
Test #1:
score: 0
Runtime Error
input:
1000 1 499500 957319857
output:
Unauthorized output
result:
Test #2:
score: 0
Runtime Error
input:
1000000 20 2000000 29091471
output:
Unauthorized output