제출 #298861

#제출 시각아이디문제언어결과실행 시간메모리
298861kevleeVision Program (IOI19_vision)C++17
14 / 100
29 ms2816 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--) int colres[205], rowres[205]; void construct_network(int h, int w, int k) { vi rows; FOR(i, 0, h-1) { vi row; FOR(j, 0, w-1) { row.pb(i * w + j); } int id = add_xor(row); add_or(row); rows.pb(add_xor({id, id + 1})); } int row_2 = add_or(rows); vi cols; FOR(j, 0, w-1) { vi col; FOR(i, 0, h-1) { col.pb(i * w + j); } colres[j] = add_xor(col); } vi adj_cols; FOR(j, 0, w-2) { adj_cols.pb(add_and({colres[j], colres[j + 1]})); } int col_1; if (w == 1) col_1 = add_and({0, add_not(0)}); else col_1 = add_or(adj_cols); int horizontal = add_and({row_2, col_1}); //----------- cols.clear(); FOR(j, 0, w-1) { vi col; FOR(i, 0, h-1) { col.pb(i * w + j); } int id = add_xor(col); add_or(col); cols.pb(add_xor({id, id + 1})); } int col_2 = add_or(cols); rows.clear(); FOR(i, 0, h-1) { vi row; FOR(j, 0, w-1) { row.pb(i * w + j); } rowres[i] = add_xor(row); } vi adj_rows; FOR(j, 0, h-2) { adj_rows.pb(add_and({rowres[j], rowres[j + 1]})); } int row_1; if (h == 1) row_1 = add_and({0, add_not(0)}); else row_1 = add_or(adj_rows); int vertical = add_and({row_1, col_2}); add_or({horizontal, vertical}); }
#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...