Submission #909480

#TimeUsernameProblemLanguageResultExecution timeMemory
909480MinhAnhndCoreputer (IOI23_coreputer)C++17
Compilation error
0 ms0 KiB
#include "coreputer.h" #include <bits/stdc++.h> using namespace std; std::vector<int> cut(int N, std::vector<int> m){ while(!m.empty()&&(*(m.rbegin())>=N)){ m.pop_back(); } return m; } std::vector<int> malfunctioning_cores(int N) { vector<int> a; vector<int> larger; vector<int> smaller; vector<int> b; for (int i = 0;i<=N-1;i++){ b.push_back(0); } for (int i = 0;i<=min(7,N-1);i++){ a.push_back(i); } int half = run_diagnostic(a); int state = abs(half); a.clear(); for (int i = 0;i<=N-1;i++){ b.push_back(0); } b[pos-1] = 1; return b; }

Compilation message (stderr)

coreputer.cpp: In function 'std::vector<int> malfunctioning_cores(int)':
coreputer.cpp:31:7: error: 'pos' was not declared in this scope; did you mean 'pow'?
   31 |     b[pos-1] = 1;
      |       ^~~
      |       pow
coreputer.cpp:24:9: warning: unused variable 'state' [-Wunused-variable]
   24 |     int state = abs(half);
      |         ^~~~~