QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#509836#9156. 百万富翁AdamGS#Compile Error//C++23502b2024-08-08 19:05:222024-08-08 19:05:26

Judging History

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

  • [2024-08-08 19:05:26]
  • 评测
  • [2024-08-08 19:05:22]
  • 提交

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);
      |                      ^~~