제출 #767739

#제출 시각아이디문제언어결과실행 시간메모리
767739t6twotwoVision Program (IOI19_vision)C++17
12 / 100
8 ms1276 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K) { vector<int> A(H + W - 1); for (int i = 0; i < H + W - 1; i++) { int x = max(0, H - i - 1); int y = max(0, i - H + 1); vector<int> v; while (x < H && y < W) { v.push_back(x * W + y); x++; y++; } A[i] = add_or(v); } vector<int> B(H + W - 1); for (int i = 0; i < H + W - 1; i++) { int x = max(0, H - i - 1); int y = min(W - 1, H + W - 2 - i); vector<int> v; while (x < H && y >= 0) { v.push_back(x * W + y); x++; y--; } B[i] = add_or(v); } vector<int> p, q; for (int i = 0; i + K < H + W - 1; i++) { p.push_back(add_and({A[i], A[i + K]})); } for (int i = 0; i < H + W - 1; i++) { vector<int> v; for (int j = 0; j <= K && i + j < H + W - 1; j++) { v.push_back(B[i + j]); } q.push_back(add_and({B[i], add_or(v)})); } vector<int> r, s; for (int i = 0; i + K < H + W - 1; i++) { r.push_back(add_and({B[i], B[i + K]})); } for (int i = 0; i < H + W - 1; i++) { vector<int> v; for (int j = 0; j <= K && i + j < H + W - 1; j++) { v.push_back(A[i + j]); } s.push_back(add_and({A[i], add_or(v)})); } add_or({add_and({add_or(p), add_or(q)}), add_and({add_or(r), add_or(s)})}); }
#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...