Submission #934356

#TimeUsernameProblemLanguageResultExecution timeMemory
934356browntoadToxic Gene (NOI23_toxic)C++17
Compilation error
0 ms0 KiB
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 (stderr)

toxic.cpp: In function 'void determine_type(int)':
toxic.cpp:3:5: error: 'vector' was not declared in this scope
    3 |     vector<int> T, N, S;
      |     ^~~~~~
toxic.cpp:3:12: error: expected primary-expression before 'int'
    3 |     vector<int> T, N, S;
      |            ^~~
toxic.cpp:6:19: error: 'query_sample' was not declared in this scope
    6 |         int ret = query_sample({i});
      |                   ^~~~~~~~~~~~
toxic.cpp:9:13: error: 'answer_type' was not declared in this scope
    9 |             answer_type(i, 'T');
      |             ^~~~~~~~~~~
toxic.cpp:11:14: error: 'T' was not declared in this scope
   11 |         else T.pb(i);
      |              ^
toxic.cpp:13:19: error: 'T' was not declared in this scope
   13 |     for (int toad:T){
      |                   ^
toxic.cpp:14:19: error: 'query_sample' was not declared in this scope
   14 |         int ret = query_sample({toad, tid});
      |                   ^~~~~~~~~~~~
toxic.cpp:16:13: error: 'answer_type' was not declared in this scope
   16 |             answer_type(toad, 'N');
      |             ^~~~~~~~~~~
toxic.cpp:18:14: error: 'answer_type' was not declared in this scope
   18 |         else answer_type({toad, 'S'});
      |              ^~~~~~~~~~~