Submission #1048296

# Submission time Handle Problem Language Result Execution time Memory
1048296 2024-08-08T06:32:22 Z Huseyn123 Vision Program (IOI19_vision) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h> 
#include "vision.h"
using namespace std;
void construct_network(int H, int W, int K) {
	vector<int> c;
	for(int i=0;i<H;i++){
		vector<int> d;
		for(int j=0;j<W;j++){
			for(int i1=i;i1<H;i1++){
				for(int j1=0;j1<W;j1++){
					if(abs(i1-i)+abs(j1-j)==K){
						d.pb(i1*W+j1);
					}
				}
			}
			int h=add_or(d);
			h=add_and({h,i*W+j});
			c.pb(h);
		}
	}
	int h=add_or(c);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:12:9: error: 'class std::vector<int>' has no member named 'pb'
   12 |       d.pb(i1*W+j1);
      |         ^~
vision.cpp:18:6: error: 'class std::vector<int>' has no member named 'pb'
   18 |    c.pb(h);
      |      ^~
vision.cpp:21:6: warning: unused variable 'h' [-Wunused-variable]
   21 |  int h=add_or(c);
      |      ^