Submission #1081707

#TimeUsernameProblemLanguageResultExecution timeMemory
1081707glupanPrisoner Challenge (IOI22_prison)C++17
Compilation error
0 ms0 KiB
#include "prison.h" #include <bits/stdc++.h> using namespace std vector<vector<int>> devise_strategy(int N) { vector<vector<int>> s(26, vector<int>(N+1)); s[0][0] = 0; for(int i=1; i<=24; i++) { if(i%2) s[i][0] = 0; else s[i][0] = 1; } for(int j=1; j<=5000; j++) { if((j & (1 << 12))) s[0][j] = 24; else s[0][j] = 12; } for(int i=24; i>=13; i--) { for(int j=1; j<=5000; j++) { if(!(j & (1 << (i-12)))) { if(i%2) s[i][j] = -2; else s[i][j] = -1; } else if((j & (1 << (i-13)))) s[i][j] = i-1; else s[i][j] = i-13; } } for(int i=12; i>=0; i--) { for(int j=1; j<=5000; j++) { if((j & (1 << i))) { if(i%2) s[i][j] = -2; else s[i][j] = -1; } else if((j & (1 << (i-1)))) s[i][j] = i+11; else s[i][j] = i-1; } } return s; }

Compilation message (stderr)

prison.cpp:5:20: error: expected ';' before 'vector'
    5 | using namespace std
      |                    ^
      |                    ;
    6 | 
    7 | vector<vector<int>> devise_strategy(int N) {
      | ~~~~~~