Submission #1064171

#TimeUsernameProblemLanguageResultExecution timeMemory
1064171hotboy2703Prisoner Challenge (IOI22_prison)C++17
5 / 100
16 ms19084 KiB
#include "prison.h" #include <bits/stdc++.h> using namespace std; using ll = int; #define MP make_pair #define fi first #define se second #define pll pair <ll,ll> #define sz(a) (ll((a).size())) #define BIT(mask,i) (((mask) >> (i))&1LL) #define MASK(i) (1LL<<(i)) std::vector<std::vector<int>> devise_strategy(int n) { vector <vector<ll> > res(n+1,vector <ll> (n+1,0)); res[0][0] = 0; for (ll i = 1;i <= n;i ++)res[i][0] = 1; for (ll i = 1;i <= n;i ++)res[0][i] = i; for (ll i = 1;i <= n;i ++){ for (ll j = 1;j <= i;j ++)res[i][j] = -2; for (ll j = i+1;j <= n;j ++)res[i][j] = -1; } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...