제출 #1105064

#제출 시각아이디문제언어결과실행 시간메모리
1105064fve5죄수들의 도전 (IOI22_prison)C++17
0 / 100
1153 ms1115644 KiB
#include <bits/stdc++.h> #include "prison.h" using namespace std; vector<vector<int>> devise_strategy(int N) { vector<vector<int>> ans; auto rec = [&](auto &&rec, int l, int r, bool fst) -> int { int sz = ans.size(); ans.emplace_back(N + 1); ans[sz][0] = fst; int m = (l + r) / 2; for (int i = 1; i <= N; i++) { if (i <= l) ans[sz][i] = fst ? -2 : -1; else if (i >= r - 1) ans[sz][i] = fst ? -1 : -2; else if (i < m) ans[sz][i] = rec(rec, l, m, !fst); else ans[sz][i] = rec(rec, m, r, !fst); } return sz; }; rec(rec, 1, N + 1, true); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...