QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#495181 | #9156. 百万富翁 | TimDee# | Compile Error | / | / | C++17 | 542b | 2024-07-27 19:21:47 | 2024-07-27 19:21:47 |
Judging History
answer
#include "richest.h"
#include <bits/stdc++.h>
using namespace std;
#define forn(i,n) for(int i=0; i<(n); ++i)
#define pb push_back
#define pi pair<int,int>
#define f first
#define s second
#define all(x) x.begin(), x.end()
int richest(int n, int t, int s) {
if (t==1) {
vector<int> f,s;
forn(i,n) forn(j,i) {f.pb(j); s.pb(i);}
auto z = ask(f,s);
vector<pi> cnt(n);
forn(i,n) cnt[i].s=i;
for(auto&x:z) cnt[x]++;
sort(all(cnt));
return cnt[n-1].s;
}
}
Details
answer.code: In function ‘int richest(int, int, int)’: answer.code:17:29: error: no ‘operator++(int)’ declared for postfix ‘++’ [-fpermissive] 17 | for(auto&x:z) cnt[x]++; answer.code:21:1: warning: control reaches end of non-void function [-Wreturn-type] 21 | } | ^