Submission #1071184

#TimeUsernameProblemLanguageResultExecution timeMemory
1071184LittleOrangeVision Program (IOI19_vision)C++17
44 / 100
1045 ms5836 KiB
#include "vision.h" #include<bits/stdc++.h> using namespace std; using ll = int; const ll big = 1e9; void construct_network(int H, int W, int K) { ll h = H; ll w = W; ll k = K; /*std::vector<int> Ns; Ns = {0, 1}; int a = add_and(Ns); Ns = {0, a}; int b = add_or(Ns); Ns = {0, 1, b}; int c = add_xor(Ns); add_not(c);*/ vector<vector<ll>> asks(H*W); for(ll x1 = 0;x1<h;x1++){ for(ll y1 = 0;y1<w;y1++){ for(ll x2 = 0;x2<h;x2++){ for(ll y2 = 0;y2<w;y2++){ ll i1 = x1*w+y1; ll i2 = x2*w+y2; if (i1>=i2) continue; if (abs(x1-x2)+abs(y1-y2)!=k) continue; asks[i1].push_back(i2); } } } } vector<ll> outs; for(ll i = 0;i<h*w;i++){ if (asks[i].empty()) continue; ll x = add_or(asks[i]); //cerr << "add_or:"; for(ll j : asks[i]) cerr << " " << j;cerr << " -> " << x << "\n"; //cerr << "add_and: " << i << " " << x << "\n"; outs.push_back(add_and({i,x})); } add_or(outs); }
#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...