Submission #899922

#TimeUsernameProblemLanguageResultExecution timeMemory
899922rxlfd314Vision Program (IOI19_vision)C++17
12 / 100
231 ms992 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; using ll = long long; using ari2 = array<int, 2>; using ari3 = array<int, 3>; using arl2 = array<ll, 2>; using arl3 = array<ll, 3>; #define vt vector #define size(x) (int((x).size())) #define all(x) begin(x), end(x) #define REP(a, b, c, d) for (int a = (b); (d) > 0 ? a <= (c) : a >= (c); a += (d)) #define FOR(a, b, c) REP(a, b, c, 1) #define ROF(a, b, c) REP(a, b, c, -1) void construct_network(int H, int W, int K) { if (min(H, W) == 1) { int cur = H * W; FOR(i, K, H*W-1) { add_and({i, i-K}); cur++; } if (K == max(H, W) - 1) return; int cur2 = cur; add_or({H*W, H*W+1}); FOR(i, H*W+2, cur-1) { add_or({i, cur2}); cur2++; } return; } int cnt = H * W; FOR(i, 0, H-1) FOR(j, 0, W-1) FOR(ii, i+1, H-1) FOR(jj, 0, W-1) if (abs(i - ii) + abs(j - jj) == K) add_and({i * W + j, ii * W + jj}), cnt++; if (cnt == H*W) return; add_or({H*W, H*W+1}); int cur = cnt; FOR(i, H*W+2, cnt-1) { add_or({i, cur}); cur++; } return; }
#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...