QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#740572 | #9156. 百万富翁 | robertfan | Compile Error | / | / | C++14 | 665b | 2024-11-13 10:33:46 | 2024-11-13 10:33:46 |
Judging History
answer
#include <bits/stdc++.h>
#include "richest.h"
using namespace std;
int mp[8]={1,183,3472,20832,62500,125000,250000,500000};
int ok[1000006];
int richest(int N,int T,int S){
if(T==1){
vector<int>a,b;
for(int i=1;i<=N;i++){
for(int j=i+1;j<=N;j++){
a.push_back(i);
b.push_back(j);
}
}
memset(ok,0,sizeof(ok));
c=ask(a,b);
for(int i=1;i<=c.size();i++){
ok[c[i]]++;
}
for(int i=1;i<=N;i++){
if(ok[i]==N-1){
return i;
}
}
}
memset(ok,0,sizeof(ok));
}
Details
answer.code: In function ‘int richest(int, int, int)’: answer.code:16:9: error: ‘c’ was not declared in this scope 16 | c=ask(a,b); | ^ answer.code:26:11: warning: control reaches end of non-void function [-Wreturn-type] 26 | memset(ok,0,sizeof(ok)); | ~~~~~~^~~~~~~~~~~~~~~~~