QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#527185 | #9156. 百万富翁 | kymmykym# | 11.00002 | 2356ms | 99412kb | C++14 | 552b | 2024-08-22 11:33:59 | 2024-08-22 11:33:59 |
Judging History
answer
#include "richest.h"
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int>pi;
int richest(int n, int T, int S){
vector<int> vec;
for(int i=0;i<n;i++){
vec.push_back(i);
}
while(vec.size()>1){
vector<int> A, B;
vector<int>nvec;
for(int i=0;i<(int)vec.size()-1;i+=2){
A.push_back(vec[i]);
B.push_back(vec[i+1]);
}
if((int)vec.size() % 2 == 1){
nvec.push_back(vec.back());//bye
}
vector<int>res=ask(A,B);
for(auto x:res){
nvec.push_back(x);
}
vec=nvec;
}
return vec[0];
}
Details
Tip: Click on the bar to expand more detailed information
Pretests
Pretest #1:
score: 0
Wrong Answer
time: 1ms
memory: 8056kb
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: 2356ms
memory: 99412kb
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: 8084kb
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: 2352ms
memory: 99244kb
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