QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#502098 | #9156. 百万富翁 | hypeskynick# | Compile Error | / | / | C++14 | 632b | 2024-08-03 00:58:37 | 2024-08-03 00:58:42 |
Judging History
answer
// Source: https://usaco.guide/general/io
#include <bits/stdc++.h>
#include "richest.h"
using namespace std;
int solveSmall(int n,int s){//task 1 is just a n^2 brute force
//simmilar to first explore task
//surely
vector<int> x,y;
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
x.emplace_push_back(i),y.emplace_push_back(j);
}
}
vector<int> z=ask(x,y),cnt(n);//ask-2005 refrence 0-0
for(int i=0;i<n;i++){
cnt[z[i]]++;
}
return *max_element(cnt.begin(),cnt.end());
}
int solveLarge(int n,int s){
}
int richest(int n, int t,int s){
if(t==1)return solveSmall(n,s);
return solveLarge(n,s);
}
详细
answer.code: In function ‘int solveSmall(int, int)’: answer.code:12:27: error: ‘class std::vector<int>’ has no member named ‘emplace_push_back’; did you mean ‘emplace_back’? 12 | x.emplace_push_back(i),y.emplace_push_back(j); | ^~~~~~~~~~~~~~~~~ | emplace_back answer.code:12:50: error: ‘class std::vector<int>’ has no member named ‘emplace_push_back’; did you mean ‘emplace_back’? 12 | x.emplace_push_back(i),y.emplace_push_back(j); | ^~~~~~~~~~~~~~~~~ | emplace_back answer.code: In function ‘int solveLarge(int, int)’: answer.code:23:1: warning: no return statement in function returning non-void [-Wreturn-type] 23 | } | ^