QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#509836 | #9156. 百万富翁 | AdamGS# | Compile Error | / | / | C++23 | 502b | 2024-08-08 19:05:22 | 2024-08-08 19:05:26 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
int solve1(int n) {
vector<int>A, B;
rep(i, n) rep(j, i) {
A.pb(j); B.pb(i);
}
vector<int>C=ask(A, B);
vector<int>ile(n);
for(auto i : C) ++ile[i];
int ans=-1;
rep(i, n) if(ile[i]==n-1) ans=i;
return ans;
}
int richest(int n, int t, int s) {
if(t==1) return solve1(n);
return 2137;
}
详细
answer.code: In function ‘int solve1(int)’: answer.code:13:22: error: ‘ask’ was not declared in this scope 13 | vector<int>C=ask(A, B); | ^~~