Submission #1052193

#TimeUsernameProblemLanguageResultExecution timeMemory
1052193ReLiceVision Program (IOI19_vision)C++17
0 / 100
15 ms3288 KiB
#include "vision.h" #include <bits/stdc++.h> #define ll int #define vll vector<ll> #define ins insert #define pb push_back using namespace std; void construct_network(int h, int w, int k) { ll i,j; auto check = [&](ll k){ auto calc = [&](auto dia){ vll a; for(auto [i, j] : dia){ a.pb(add_or(j)); } vll pr(a.size()); ll n=a.size(); for(i=0;i<n;i++){ if(i==0) pr[i] = a[i]; else pr[i] = add_or({pr[i - 1], a[i]}); } vll res; for(i=k;i<n;i++){ res.pb(add_and({pr[i - k], a[i]})); } return add_or(res); }; map<ll,vector<ll>> dia,dia2; for(i=0;i<h;i++){ for(j=0;j<w;j++){ dia[i+j].pb(i * w + j); dia2[i-j].pb(i * w + j); } } return add_or({calc(dia), calc(dia2)}); }; ll a = check(k), b = check(k + 1); add_and({a, add_not(b)}); }
#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...