Submission #1081706

#TimeUsernameProblemLanguageResultExecution timeMemory
1081706glupanPrisoner 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>> v(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; } } }

Compilation message (stderr)

prison.cpp:5:20: error: expected ';' before 'vector'
    5 | using namespace std
      |                    ^
      |                    ;
    6 | 
    7 | vector<vector<int>> devise_strategy(int N) {
      | ~~~~~~              
prison.cpp: In function 'std::vector<std::vector<int> > devise_strategy(int)':
prison.cpp:9:3: error: 's' was not declared in this scope
    9 |   s[0][0] = 0;
      |   ^
prison.cpp:50:1: warning: no return statement in function returning non-void [-Wreturn-type]
   50 | }
      | ^