QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#502015 | #9156. 百万富翁 | maxrgby# | 0 | 5865ms | 106788kb | C++14 | 705b | 2024-08-03 00:31:25 | 2024-08-03 00:31:26 |
Judging History
answer
#include <bits/stdc++.h>
#include "richest.h"
using namespace std;
int richest(int n, int t, int s) {
set<int> nums;
for(int i = 0;i < n;i++){
nums.insert(i);
}
vector<int> a,b,c;
while(t--){
a.clear();
b.clear();
c.clear();
int i = 0;
for(auto it = nums.begin();it != nums.end();it++,i++){
if(i&1){
b.push_back(*it);
}else{
a.push_back(*it);
}
}
if(a.size() != b.size()){
b.push_back({*nums.rbegin()});
}
c = ask(a,b);
nums.clear();
for(auto i : c){
nums.insert(i);
}
cout << endl;
}
return *nums.begin();
}
// int main(){
// int n,t,s;
// cin >> n >> t >> s;
// cout << richest(n,t,s) << endl;
// }
Details
Tip: Click on the bar to expand more detailed information
Pretests
Pretest #1:
score: 0
Wrong Answer
time: 1ms
memory: 8020kb
input:
1000 1 499500 957319859
output:
Unauthorized output
result:
points 0.0 Invalid signature
Pretest #2:
score: 0
Wrong Answer
time: 5831ms
memory: 106788kb
input:
1000000 20 2000000 29091473
output:
Unauthorized output
result:
points 0.0 Invalid signature
Final Tests
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 8068kb
input:
1000 1 499500 957319857
output:
Unauthorized output
result:
points 0.0 Invalid signature
Test #2:
score: 0
Wrong Answer
time: 5865ms
memory: 104764kb
input:
1000000 20 2000000 29091471
output:
Unauthorized output
result:
points 0.0 Invalid signature