QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#502002 | #9156. 百万富翁 | fryan# | 0 | 17ms | 23324kb | C++14 | 1.1kb | 2024-08-03 00:27:07 | 2024-08-03 00:27:07 |
Judging History
answer
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#include "richest.h"
using namespace std;
#define sz(x) (int) (x).size()
#define i64 int64_t
#define all(x) (x).begin(), (x).end()
vector<int> a,b;
vector<int> c;
int subtask_1(int N) {
for (int i=1; i<=N; i++) {
for (int j=i+1; j<=N; j++) {
a.push_back(i);
b.push_back(j);
}
}
c = ask(a,b);
set<int> ok;
for (int i=1; i<=N; i++) {
ok.insert(i);
}
for (int i=0; i<sz(c); i++) {
if (ok.count(a[i]+b[i]-c[i])) {
ok.erase(a[i]+b[i]-c[i]);
}
}
assert(sz(ok)==1);
return *(ok.begin());
}
int richest(int N, int T, int S) {
if (T!=1) return -1;
subtask_1(N);
return 1;
}
詳細信息
Pretests
Pretest #1:
score: 0
Wrong Answer
time: 0ms
memory: 15104kb
input:
1000 1 499500 957319859
output:
Index out of bounds 9775460264716263939 0.000000 6906350380861515327
result:
points 0.0 Index out of bounds
Pretest #2:
score: 0
Wrong Answer
time: 6ms
memory: 23324kb
input:
1000000 20 2000000 29091473
output:
Wrong answer 4459638610240858557 0.000000 6906350380861515327
result:
points 0.0 Wrong answer
Final Tests
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 15188kb
input:
1000 1 499500 957319857
output:
Index out of bounds 9775460264716263939 0.000000 6906350380861515327
result:
points 0.0 Index out of bounds
Test #2:
score: 0
Wrong Answer
time: 17ms
memory: 23320kb
input:
1000000 20 2000000 29091471
output:
Wrong answer 4459638610240858557 0.000000 6906350380861515327
result:
points 0.0 Wrong answer