QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#506776 | #9156. 百万富翁 | 12345678hzx | Compile Error | / | / | C++14 | 866b | 2024-08-05 21:36:24 | 2024-08-05 21:36:26 |
Judging History
answer
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<set>
#include<queue>
#include<stack>
#include<vector>
#include<ctime>
#include<map>
#include<set>
#include<bitset>
#include<list>
#include "richest.h"
using namespace std;
int main(int N,int T,int S) {
int cnt=0;
std::vector<int>t,a,b,Map;
Map.resize(1000005);
for(int i=0;i<N;i++) t.push_back(i);
while(cnt<9) {
if(N<=2000) break;
a.clear(),b.clear();
for(int i=1;i<=N/2;i++) a.push_back(t[i*2-2]),b.push_back(t[i*2-1]);
int last=t.back();
t=ask(a,b);
if(N&1) t.push_back(last);
N=(N+1)/2,cnt++;
}
a.clear(),b.clear();
for(int i=1;i<=N;i++) for(int j=i+1;j<=N;j++) a.push_back(t[i-1]),b.push_back(t[j-1]);
t=ask(a,b);
for(auto i:t) Map[i]++;
for(auto i:t) if(Map[i]==N-1) return i;
}
Details
answer.code:20:5: warning: second argument of ‘int main(int, int, int)’ should be ‘char **’ [-Wmain] 20 | int main(int N,int T,int S) { | ^~~~ answer.code:20:5: warning: third argument of ‘int main(int, int, int)’ should probably be ‘char **’ [-Wmain] /usr/bin/ld: /tmp/ccskT8mE.o: in function `main': answer.code:(.text.startup+0x0): multiple definition of `main'; /tmp/ccFFBoGF.o:implementer.cpp:(.text.startup+0x0): first defined here /usr/bin/ld: /tmp/ccFFBoGF.o: in function `main': implementer.cpp:(.text.startup+0x1df): undefined reference to `richest(int, int, int)' collect2: error: ld returned 1 exit status