Submission #638262

#TimeUsernameProblemLanguageResultExecution timeMemory
638262aris12345678Prisoner Challenge (IOI22_prison)C++17
5 / 100
29 ms27724 KiB
#include "prison.h" #include <bits/stdc++.h> using namespace std; vector<vector<int> > devise_strategy(int n) { vector<vector<int> > ans(n); for(int i = 0; i < n; i++) { if(i == 0) ans[i].push_back(0); else ans[i].push_back(1); for(int j = 1; j <= n; j++) { if(i == 0) { if(j == 1) ans[i].push_back(-1); else if(j == n) ans[i].push_back(-2); else ans[i].push_back(j); } else if(i == 1) { if(j == 1) ans[i].push_back(-2); else if(j == n) ans[i].push_back(-1); else ans[i].push_back(0); } else { if(i > j) ans[i].push_back(-2); else if(i == j) ans[i].push_back(0); else ans[i].push_back(-1); } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...