QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#490614#9156. 百万富翁EternatisCompile Error//C++141.4kb2024-07-25 15:52:302024-07-25 15:52:32

Judging History

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

  • [2024-07-25 15:52:32]
  • 评测
  • [2024-07-25 15:52:30]
  • 提交

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];
vi ask(vi a,vi b);
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 richest(long long int, long long int, long long int)’:
answer.code:65:1: warning: control reaches end of non-void function [-Wreturn-type]
   65 | }
      | ^
/usr/bin/ld: /tmp/cc5UQG8v.o: in function `main':
implementer.cpp:(.text.startup+0x1df): undefined reference to `richest(int, int, int)'
/usr/bin/ld: /tmp/cc5E2s8x.o: in function `solve1()':
answer.code:(.text._Z6solve1v[_Z6solve1v]+0x250): undefined reference to `ask(std::vector<long long, std::allocator<long long> >, std::vector<long long, std::allocator<long long> >)'
collect2: error: ld returned 1 exit status