Submission #1081714

#TimeUsernameProblemLanguageResultExecution timeMemory
1081714glupanPrisoner Challenge (IOI22_prison)C++17
0 / 100
1 ms604 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; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...