Submission #172101

#TimeUsernameProblemLanguageResultExecution timeMemory
172101dsjongVision Program (IOI19_vision)C++14
44 / 100
14 ms2032 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; int H,W,K; int get(int x,int y){ return x*W+y; } void construct_network(int h, int w, int k) { vector<int>v; H=h, W=w, K=k; int init=add_and({add_and({0}),add_not(0)}); for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ vector<int>v2; v2.push_back(init); for(int l=-K;l<=K;l++){ int i1=i+l; int j1=j+(K-abs(l)); if(i1>=0&&i1<h){ if(j1>=0&&j1<w){ v2.push_back(get(i1,j1)); } } } v.push_back(add_and({get(i,j),add_or(v2)})); } } int res=add_or(v); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:30:6: warning: unused variable 'res' [-Wunused-variable]
  int res=add_or(v);
      ^~~
#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...