제출 #316682

#제출 시각아이디문제언어결과실행 시간메모리
316682juggernautVision Program (IOI19_vision)C++14
100 / 100
81 ms7160 KiB
#include"vision.h" #include<bits/stdc++.h> #ifdef EVAL #else #include"grader.cpp" #endif using namespace std; vector<int>g1[405],g2[405]; int run(int H,int W,int K){ for(int i=0;i<H;i++) for(int j=0;j<W;j++){ g1[i+j].push_back(i*W+j); g2[i-j+W-1].push_back(i*W+j); } vector<int>cas,rdiag,ldiag,prefr,prefl; for(int i=0;i<=H+W-2;i++){ rdiag.push_back(add_or(g1[i])); ldiag.push_back(add_or(g2[i])); prefr.push_back(add_or(rdiag)); prefl.push_back(add_or(ldiag)); if(i>=K){ cas.push_back(add_and({rdiag[i],prefr[i-K]})); cas.push_back(add_and({ldiag[i],prefl[i-K]})); } } return add_or(cas); } void construct_network(int H,int W,int K){ if(H+W-2==K)add_or({run(H,W,K)}); else add_xor({run(H,W,K),run(H,W,K+1)}); }
#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...