Submission #602886

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6028862022-07-23 12:20:22alirezasamimi100Vision Program (IOI19_vision)C++17
100 / 100
10 ms1784 KiB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
const int N = 405;
vector<int> rd[N],ld[N],ans,unans;
int r[N],l[N],pl[N],pr[N],an,unan;
void construct_network(int H, int W, int K) {
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
rd[i+j].pb(i*W+j);
ld[i-j+W-1].pb(i*W+j);
}
}
for(int i=H+W-2; i>=0; i--){
r[i]=add_or(rd[i]);
l[i]=add_or(ld[i]);
if(i==H+W-2){
pl[i]=l[i];
pr[i]=r[i];
}else{
pl[i]=add_or({pl[i+1],l[i]});
pr[i]=add_or({pr[i+1],r[i]});
}
if(i+K<H+W-1){
ans.pb(add_and({l[i],l[i+K]}));
ans.pb(add_and({r[i],r[i+K]}));
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...