Submission #1026205

#TimeUsernameProblemLanguageResultExecution timeMemory
1026205HD1Vision Program (IOI19_vision)C++14
0 / 100
12 ms1880 KiB
#include "vision.h" #include<bits/stdc++.h> #define sz(x) ll(x.size()) #define all(x) x.begin(),x.end() #define pb push_back #define ff first #define ss second using namespace std; typedef long long ll; typedef pair<ll,ll> ii; const ll MAX=1e6; int n, m, k; vector<int>s,p,q; void construct_network(int H, int W, int K){ n=H; m=W; k=K; for(int j=0; j<m; j++){ for(int i=0; i<n; i++){ p.pb(i*m+j); } q.pb(add_or(p)); p.clear(); } for(int i=0; i<sz(q)-1; i++){ p.pb(q[i]); p.pb(q[i+1]); s.pb(add_and(p)); p.pop_back(); p.pop_back(); } int pos=add_or(s);//si hay 2 juntitos columnas s.clear(); p.clear(); q.clear(); // esto dbe xor 1 si estan en la misma fila for(int i=0; i<n; i++){ for(int j=0; j<m; j++){ p.pb(i*m+j); } q.pb(add_or(p)); p.clear(); } s.pb(add_xor(q)); s.pb(pos); int a=add_and(s); s.clear(); p.clear(); q.clear(); for(int i=0; i<n; i++){ for(int j=0; j<m; j++){ p.pb(i*m+j); } q.pb(add_or(p)); p.clear(); } for(int i=0; i<sz(q)-1; i++){ p.pb(q[i]); p.pb(q[i+1]); s.pb(add_and(p)); p.pop_back(); p.pop_back(); } pos=add_or(s);//si hay 2 juntitos en la misma fila s.clear(); p.clear(); q.clear(); // esto dbe xor 1 si estan en la misma columna for(int j=0; j<m; j++){ for(int i=0; i<n; i++){ p.pb(i*m+j); } q.pb(add_or(p)); p.clear(); } s.pb(add_xor(q)); s.pb(pos); int b=add_and(s); add_or({b,a}); 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...