QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#490623 | #9156. 百万富翁 | Eternatis | 0 | 125ms | 24988kb | C++14 | 1.4kb | 2024-07-25 15:54:36 | 2024-07-25 15:54:39 |
Judging History
answer
//¸¡ÓÎÖ®ÈË Ò²ÕõÔú²»ÒÑÖ´×Å´æÔÚÏÂÈ¥
#include<bits/stdc++.h>
#include "richest.h"
using namespace std;
#define N 1000010
#define db long double
#define pii pair<int,int>
#define st first
#define ed second
#define mkp make_pair
#define pb push_back
#define eps 1e-9
#define mod 998244353
#define mod2 1000000007
#define bs 13131
#define bs2 131
#define INF 0x3f3f3f3f3f3f3f3f
#define il inline
#define vi vector<int>
#define ins insert
#define umap unordered_map
#define uset unordered_set
#define R(x) x.begin(),x.end()
#define B(x) x.begin()
#define E(x) x.end()
#define lb lower_bound
#define ub upper_bound
#define vi vector<int>
il int read(){
int x=0,f=1;
char ch=getchar();
while(ch<'0'||ch>'9'){
if(ch=='-')f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9'){
x=(x<<1)+(x<<3)+(ch^48);
ch=getchar();
}
return x*f;
}
int T=1,n,m,q,k;
int s[N];
bool cmp[1010][1010];
vi ask(vi a,vi b);
il int solve1(){
vi a,b;
for(int i=0;i<n;i++)
for(int j=i+1;j<n;j++)
a.pb(i),b.pb(j);
vi op=ask(a,b);
int p=0;
for(int i=0;i<n*(n-1)/2;i++){
int A=a[i],B=b[i];
if(op[i]==A)cmp[A][B]=1;
}
for(int i=1;i<n;i++)
if(!cmp[p][i])p=i;
return p;
}
int richest(int nn,int ttt,int sss){
n=nn;
if(n==1000)return solve1();
}
//signed main(){
// T=read();
// while(T--)solve();
// return 0;
//}
Details
Tip: Click on the bar to expand more detailed information
Pretests
Pretest #1:
score: 0
Wrong Answer
time: 125ms
memory: 23480kb
input:
1000 1 499500 957319859
output:
Wrong answer 4459638610240858557 0.000000 6906350380861515327
result:
points 0.0 Wrong answer
Pretest #2:
score: 0
Memory Limit Exceeded
input:
1000000 20 2000000 29091473
output:
Unauthorized output
result:
Final Tests
Test #1:
score: 0
Wrong Answer
time: 112ms
memory: 24988kb
input:
1000 1 499500 957319857
output:
Wrong answer 4459638610240858557 0.000000 6906350380861515327
result:
points 0.0 Wrong answer
Test #2:
score: 0
Memory Limit Exceeded
input:
1000000 20 2000000 29091471
output:
Unauthorized output