QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#509953#9156. 百万富翁Rafi22#11.00002 2488ms97812kbC++141.2kb2024-08-08 20:08:052024-08-08 20:08:06

Judging History

你现在查看的是最新测评结果

  • [2024-08-08 20:08:06]
  • 评测
  • 测评结果:11.00002
  • 用时:2488ms
  • 内存:97812kb
  • [2024-08-08 20:08:05]
  • 提交

answer

#include "richest.h"
#include <bits/stdc++.h>

using namespace std;

#ifdef DEBUG
auto&operator<<(auto&o,pair<auto,auto>p){return o<<"("<<p.first<<", "<<p.second<<")";}
auto operator<<(auto&o,auto x)->decltype(x.end(),o){o<<"{";int i=0;for(auto e:x)o<<","+!i++<<e;return o<<"}";}
#define debug(X...)cerr<<"["#X"]: ",[](auto...$){((cerr<<$<<"; "),...)<<endl;}(X)
#else
#define debug(...){}
#endif

#define ll long long
#define ld long double
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define FOR(i,l,r) for(int i=(l);i<=(r);i++)
#define ROF(i,r,l) for(int i=(r);i>=(l);i--)
int inf=1000000007;
ll infl=1000000000000000007;
ll mod=1000000007;
ll mod1=998244353;

int richest(int n,int T,int S)
{
    vector<int>V(n);
    FOR(i,0,n-1) V[i]=i;
    while(sz(V)>1)
    {
        vector<int>A,B;
        for(int i=0;i+1<sz(V);i+=2)
        {
            A.pb(V[i]);
            B.pb(V[i+1]);
        }
        vector<int>nV=ask(A,B);
        if(sz(V)%2==1) nV.pb(V.back());
        V=nV;
    }
    return V[0];
}




















詳細信息


Pretests

Pretest #1:

score: 0
Wrong Answer
time: 1ms
memory: 7984kb

input:

1000 1 499500 957319859

output:

Too many queries
1294109832092195181
0.000000
6906350380861515327

result:

points 0.0 Too many queries

Pretest #2:

score: 11
Acceptable Answer
time: 2417ms
memory: 93992kb

input:

1000000 20 2000000 29091473

output:

Partially correct Case 2, 11 / 85, maxt = 20, maxs = 999999
1811468636458994965
0.129412
3823502568050958645

result:

points 0.129412 Partially correct Case 2, 11 / 85, maxt = 20, maxs = 999999


Final Tests

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 7964kb

input:

1000 1 499500 957319857

output:

Too many queries
1294109832092195181
0.000000
6906350380861515327

result:

points 0.0 Too many queries

Test #2:

score: 11
Acceptable Answer
time: 2488ms
memory: 97812kb

input:

1000000 20 2000000 29091471

output:

Partially correct Case 2, 11 / 85, maxt = 20, maxs = 999999
1811468636458994965
0.129412
3823502568050958645

result:

points 0.129412 Partially correct Case 2, 11 / 85, maxt = 20, maxs = 999999