제출 #298919

#제출 시각아이디문제언어결과실행 시간메모리
298919kevleeVision Program (IOI19_vision)C++17
0 / 100
4 ms2176 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; #define pb push_back #define inf 1000000000 #define ll long long #define fi first #define se second #define pii pair<int, int> #define pll pair<ll, ll> #define vi vector<int> #define vl vector<ll> #define vp vector<pii> #define SET(a, b) memset(a, b, sizeof(a)) #define all(x) (x).begin(), (x).end() #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define FORD(i, a, b) for (int i = (a); i >= (b); i--) vi diag[500], diag2[500]; void construct_network(int h, int w, int k) { FOR(i, 0, h-1) { FOR(j, 0, w-1) { diag[i+j].pb(i*w+j); diag2[i+w-1-j].pb(i*w+j); } } vi one, two; FOR(i, 0, k-1) { for (int j = i; j + k <= h + w - 2; j += k) { vi query; FOR(l, j, j + k) { for (auto it: diag[l]) query.pb(it); } one.pb(add_xor({add_xor(query), add_or(query)})); } for (int j = i; j + k <= h + w - 2; j += k) { vi query; FOR(l, j, j + k) { for (auto it: diag2[l]) query.pb(it); } two.pb(add_xor({add_xor(query), add_or(query)})); } } int id = add_and({add_or(one), add_or(two)}); //---- one.clear(); two.clear(); k--; FOR(i, 0, k-1) { for (int j = i; j + k <= h + w - 2; j += k) { vi query; FOR(l, j, j + k) { for (auto it: diag[l]) query.pb(it); } one.pb(add_xor({add_xor(query), add_or(query)})); } for (int j = i; j + k <= h + w - 2; j += k) { vi query; FOR(l, j, j + k) { for (auto it: diag2[l]) query.pb(it); } two.pb(add_xor({add_xor(query), add_or(query)})); } } int id2 = add_and({add_or(one), add_or(two)}); add_and({id, add_not(id2)}); }
#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...