QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#490604#9156. 百万富翁EternatisCompile Error//C++141.4kb2024-07-25 15:50:492024-07-25 15:50:49

Judging History

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

  • [2024-07-25 15:50:49]
  • 评测
  • [2024-07-25 15:50:49]
  • 提交

answer

//¸¡ÓÎÖ®ÈË Ò²ÕõÔú²»ÒÑÖ´×Å´æÔÚÏÂÈ¥
#include<bits/stdc++.h>
#include "richest.h"
using namespace std;
#define N 1000010
#define int long long
#define db long double
#define pii pair<int,int>
#define st first
#define ed second
#define mkp make_pair
#define pb push_back
#define eps 1e-9
#define mod 998244353
#define mod2 1000000007
#define bs 13131
#define bs2 131
#define INF 0x3f3f3f3f3f3f3f3f
#define il inline
#define vi vector<int>
#define ins insert
#define umap unordered_map
#define uset unordered_set
#define R(x) x.begin(),x.end()
#define B(x) x.begin()
#define E(x) x.end()
#define lb lower_bound
#define ub upper_bound
#define vi vector<int>
il int read(){
	int x=0,f=1;
	char ch=getchar();
	while(ch<'0'||ch>'9'){
		if(ch=='-')f=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9'){
		x=(x<<1)+(x<<3)+(ch^48);
		ch=getchar();
	}
	return x*f;
}
int T=1,n,m,q,k;
int s[N];
bool cmp[1010][1010];
il int solve1(){
	vi a,b;
	for(int i=0;i<n;i++)
		for(int j=i+1;j<n;j++)
			a.pb(i),b.pb(j);
	vi op=ask(a,b);
	int p=0;
	for(int i=0;i<n*(n-1)/2;i++){
		int A=a[i],B=b[i];
		if(op[i]==A)cmp[A][B]=1;
	}
	for(int i=1;i<n;i++)
		if(!cmp[p][i])p=i;
	return p;
}
int richest(int nn,int ttt,int sss){
	n=nn;
	if(n==1000)return solve1();
}
signed main(){
	T=read();
	while(T--)solve();
	return 0;
}


Details

answer.code: In function ‘long long int solve1()’:
answer.code:51:19: error: could not convert ‘a’ from ‘vector<long long int>’ to ‘vector<int>’
   51 |         vi op=ask(a,b);
      |                   ^
      |                   |
      |                   vector<long long int>
answer.code: In function ‘int main()’:
answer.code:67:19: error: ‘solve’ was not declared in this scope; did you mean ‘solve1’?
   67 |         while(T--)solve();
      |                   ^~~~~
      |                   solve1
answer.code: In function ‘long long int richest(long long int, long long int, long long int)’:
answer.code:64:1: warning: control reaches end of non-void function [-Wreturn-type]
   64 | }
      | ^