Submission #730297

#TimeUsernameProblemLanguageResultExecution timeMemory
730297ismayilPrisoner Challenge (IOI22_prison)C++17
Compilation error
0 ms0 KiB
#pragma GCC target ("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #define endl '\n' using namespace std; vector<vector<int>> devise_strategy(int N) { vector<vector<int>> s(27, vector<int>(N + 1, 0)); for(int i = 0; i <= 26; i++){ int d = i / 2; int bit = i % 2; if(d % 2 == 0) s[i][0] = 0; else s[i][0] = 1; for(int j = 1; j <= N; j++){ int _bit = (j & (1<<(12 - d))); if(bit < _bit){ if(d % 2 == 0) s[i][j] = -2; else s[i][j] = -1; }else if(bit > _bit){ if(d % 2 == 0) s[i][j] = -1; else s[i][j] = -2; }else if(d == 13){ s[i][j] = -2; }else{ s[i][j] = (d + 1) * 2 + (j & (1<<(11 - d))); } } } return s; } void solve(){ vector<vector<int>> v = devise_strategy(2); for(auto i : v){ for(auto j : i){ cout << j << " "; } cout << endl; } } signed main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); //freopen("output.txt", "w", stdout); int t = 1; //cin >> t; for(int i = 1; i <= t; i++){ //printf("Case #%d: ", i); solve(); } }

Compilation message (stderr)

/usr/bin/ld: /tmp/cceXYi6y.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccWzVg4x.o:prison.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status