Submission #762124

#TimeUsernameProblemLanguageResultExecution timeMemory
762124raysh07Prisoner Challenge (IOI22_prison)C++17
Compilation error
0 ms0 KiB
#include "prison.h" #include <bits/stdc++.h> vector<vector<int>> devise_strategy(int n) { vector<vector<int>> ans(29, vector<int>(n + 1)); for (int i = 0; i <= 28; i++){ if (i % 3 == 0) ans[i][0] = 0; else ans[i][0] = 1; for (int j = 1; j <= n; j++){ int bit = 12 - (i/3); if (i % 3 == 0){ ans[i][j] = i + 1 + (j >> bit & 1); } else { int ba = (i % 3) - 1; int bb = (j >> bit & 1); if (ba < bb) ans[i][j] = -1; else if (ba > bb) ans[i][j] = -2; else ans[i][j] = ((i/3) + 1) * 3; } } } return ans; }

Compilation message (stderr)

prison.cpp:4:1: error: 'vector' does not name a type
    4 | vector<vector<int>> devise_strategy(int n) {
      | ^~~~~~