QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#501999#9156. 百万富翁fryan#Compile Error//C++141.1kb2024-08-03 00:25:052024-08-03 00:25:08

Judging History

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

  • [2024-08-03 00:25:08]
  • 评测
  • [2024-08-03 00:25:05]
  • 提交

answer

#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#include "richest.h"
using namespace std;
#define sz(x) (int) (x).size()
#define i64 int64_t
#define all(x) (x).begin(), (x).end()

vector<int> a,b;
vector<int> c;

int richest(int N, int T, int S) {
    subtask_1(N);
    return 1;
}

int subtask_1(int N) {
    for (int i=1; i<=N; i++) {
        for (int j=i+1; j<=N; j++) {
            a.push_back(i);
            b.push_back(j);
        }
    }
    c = ask(a,b);
    set<int> ok;
    for (int i=1; i<=N; i++) {
        ok.insert(i);
    }
    for (int i=0; i<sz(c); i++) {
        if (ok.count(a[i]+b[i]-c[i])) {
            ok.erase(a[i]+b[i]-c[i]);
        }
    }
    assert(sz(ok)==1);
    return *(ok.begin());
}

詳細信息

answer.code: In function ‘int richest(int, int, int)’:
answer.code:34:5: error: ‘subtask_1’ was not declared in this scope
   34 |     subtask_1(N);
      |     ^~~~~~~~~