Submission #587914

# Submission time Handle Problem Language Result Execution time Memory
587914 2022-07-02T13:57:13 Z ogibogi2004 Vision Program (IOI19_vision) C++14
Compilation error
0 ms 0 KB
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;

void construct_network(int H, int W, int K) {
    vector<int>v;
    for(int i=0;i<H;i++)
    {
        for(int j=0;j<W;j++)
        {
            if(i+j==k)v.push_back(i*W+j);
        }
    }
    add_or(v);
}




Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:11:21: error: 'k' was not declared in this scope
   11 |             if(i+j==k)v.push_back(i*W+j);
      |                     ^