Submission #876325

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