Submission #832347

#TimeUsernameProblemLanguageResultExecution timeMemory
832347maomao90Vision Program (IOI19_vision)C++17
40 / 100
4 ms620 KiB
// I can do all things through Christ who strenghthens me // Philippians 4:13 #include "bits/stdc++.h" #include "vision.h" using namespace std; #define REP(i, j, k) for (int i = j; i < (k); i++) #define RREP(i, j, k) for (int i = j; i >= (k); i--) template <class T> inline bool mnto(T &a, const T b) {return a > b ? a = b, 1 : 0;} template <class T> inline bool mxto(T &a, const T b) {return a < b ? a = b, 1 : 0;} typedef long long ll; typedef long double ld; #define FI first #define SE second typedef pair<int, int> ii; typedef pair<ll, ll> pll; #define ALL(x) x.begin(), x.end() #define SZ(x) (int) x.size() #define pb push_back typedef vector<int> vi; typedef vector<ii> vii; typedef vector<ll> vll; typedef tuple<int, int, int> iii; typedef vector<iii> viii; #ifndef DEBUG #define cerr if (0) cerr #endif const int INF = 1000000005; const ll LINF = 1000000000000000005; const int MAXN = 200005; int h, w, k; void construct_network(int H, int W, int K) { h = H, w = W; k = K; vi all; REP (i, 0, h) { REP (j, 0, w) { if (max(h, w) > 30 && j != 0) { break; } vi v; REP (ni, 0, h) { if (abs(ni - i) > k) { continue; } { // abs(ni - i) + nj - j = k // nj = k - abs(ni - i) + j int nj = k - abs(ni - i) + j; if (nj >= 0 && nj < w) { v.pb(ni * w + nj); } } } if (v.empty()) { continue; } int tmp = add_or(v); all.pb(add_and({i * w + j, tmp})); } } add_or(all); }
#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...