Submission #909375

#TimeUsernameProblemLanguageResultExecution timeMemory
909375MinhAnhndCoreputer (IOI23_coreputer)C++17
Compilation error
0 ms0 KiB
#include "coreputer.h" #include <bits/stdc++.h> std::vector<int> malfunctioning_cores(int N) { vector<int> a; for (int i = 0;i<=min(7,N-1);i++){ a.push_back(i); } half = run_diagnostic(a); vector<int> b; for (int i = 0;i<=N-1;i++){ b.push_back(1); } return b; }

Compilation message (stderr)

coreputer.cpp: In function 'std::vector<int> malfunctioning_cores(int)':
coreputer.cpp:5:5: error: 'vector' was not declared in this scope
    5 |     vector<int> a;
      |     ^~~~~~
coreputer.cpp:5:5: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
                 from coreputer.h:1,
                 from coreputer.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note:   'std::vector'
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from coreputer.h:1,
                 from coreputer.cpp:1:
/usr/include/c++/10/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
coreputer.cpp:5:12: error: expected primary-expression before 'int'
    5 |     vector<int> a;
      |            ^~~
coreputer.cpp:6:23: error: 'min' was not declared in this scope; did you mean 'std::min'?
    6 |     for (int i = 0;i<=min(7,N-1);i++){
      |                       ^~~
      |                       std::min
In file included from /usr/include/c++/10/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from coreputer.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: 'std::min' declared here
 3474 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
coreputer.cpp:7:9: error: 'a' was not declared in this scope
    7 |         a.push_back(i);
      |         ^
coreputer.cpp:9:5: error: 'half' was not declared in this scope
    9 |     half = run_diagnostic(a);
      |     ^~~~
coreputer.cpp:9:27: error: 'a' was not declared in this scope
    9 |     half = run_diagnostic(a);
      |                           ^
coreputer.cpp:10:12: error: expected primary-expression before 'int'
   10 |     vector<int> b;
      |            ^~~
coreputer.cpp:12:9: error: 'b' was not declared in this scope
   12 |         b.push_back(1);
      |         ^
coreputer.cpp:14:9: error: 'b' was not declared in this scope
   14 |  return b;
      |         ^