Submission #934357

# Submission time Handle Problem Language Result Execution time Memory
934357 2024-02-27T08:09:22 Z browntoad Toxic Gene (NOI23_toxic) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;

void determine_type(int n){

    vector<int> T, N, S;
    int tid = -1;
    for (int i = 1; i <= n; i++){
        int ret = query_sample({i});
        if (ret == 0){
            tid = i;
            answer_type(i, 'T');
        }
        else T.pb(i);
    }
    for (int toad:T){
        int ret = query_sample({toad, tid});
        if (ret == 0){
            answer_type(toad, 'N');
        }
        else answer_type({toad, 'S'});
    }

}

Compilation message

toxic.cpp: In function 'void determine_type(int)':
toxic.cpp:9:19: error: 'query_sample' was not declared in this scope
    9 |         int ret = query_sample({i});
      |                   ^~~~~~~~~~~~
toxic.cpp:12:13: error: 'answer_type' was not declared in this scope
   12 |             answer_type(i, 'T');
      |             ^~~~~~~~~~~
toxic.cpp:14:16: error: 'class std::vector<int>' has no member named 'pb'
   14 |         else T.pb(i);
      |                ^~
toxic.cpp:17:19: error: 'query_sample' was not declared in this scope
   17 |         int ret = query_sample({toad, tid});
      |                   ^~~~~~~~~~~~
toxic.cpp:19:13: error: 'answer_type' was not declared in this scope
   19 |             answer_type(toad, 'N');
      |             ^~~~~~~~~~~
toxic.cpp:21:14: error: 'answer_type' was not declared in this scope
   21 |         else answer_type({toad, 'S'});
      |              ^~~~~~~~~~~