Submission #1084027

#TimeUsernameProblemLanguageResultExecution timeMemory
1084027ZeroCoolVision Program (IOI19_vision)C++14
100 / 100
54 ms7444 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; #define ar array void construct_network(int n, int m, int k) { auto check = [&](int l) { if (l > n + m - 2) return add_xor({0, 0}); ar<vector<int>, 2> d[n + m - 1]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { d[i + j][0].push_back(i * m + j); d[i - j + m - 1][1].push_back(i * m + j); } } vector<int> cands; ar<vector<int>, 2> A; for (int i = l; i <= n + m - 2; i++) { for (auto j : {0, 1}) { A[j].push_back(add_or(d[i - l][j])); cands.push_back(add_and({add_or(A[j]), add_or(d[i][j])})); } } return add_or(cands); }; add_and({check(k), add_not(check(k + 1))}); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...