Submission #1092402

#TimeUsernameProblemLanguageResultExecution timeMemory
1092402LuvidiCoreputer (IOI23_coreputer)C++17
Compilation error
0 ms0 KiB
std::vector<int> malfunctioning_cores(int n) { int idx,s; vector<int> v; for(int i=0;i<n;i++){ v.push_back(i); int x=run_diagnostic(v); if(x!=-1){ s=x; idx=i; break; } } vector<int> ans(n); if(s){ v.pop_back(); for(int i=idx;i<n;i++){ v.push_back(i); ans[i]=run_diagnostic(v)==1; v.pop_back(); } v.clear(); for(int i=idx+1;i<n;i++)v.push_back(i); for(int i=0;i<idx;i++){ v.push_back(i); ans[i]=run_diagnostic(v)==1; v.pop_back(); } }else{ for(int i=idx+1;i<n;i++){ v.push_back(i); ans[i]=run_diagnostic(v)==1; v.pop_back(); } v.clear(); for(int i=idx+1;i<n;i++)v.push_back(i); for(int i=0;i<=idx;i++){ v.push_back(i); ans[i]=run_diagnostic(v)==1; v.pop_back(); } } return ans; }

Compilation message (stderr)

coreputer.cpp:1:6: error: 'vector' in namespace 'std' does not name a template type
    1 | std::vector<int> malfunctioning_cores(int n) {
      |      ^~~~~~
coreputer.cpp:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
  +++ |+#include <vector>
    1 | std::vector<int> malfunctioning_cores(int n) {