답안 #922431

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
922431 2024-02-05T13:56:42 Z ttamx Vision Program (IOI19_vision) C++14
컴파일 오류
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> res;
  	for(int xi=0;xi<H;xi++){
    	for(int yi=0;yi<W;yi++){
        	for(int xj=0;x<=xi;xj++){
            	for(int yj=0;yj<=yi;yj++){
                	if(xi-xj+yi-yj==K){
                    	res.push_back(add_and({xi*W+yi,xj*W+yj});
                    }
				}
            }
        }
    }
 	add_or(res);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:10:23: error: 'x' was not declared in this scope; did you mean 'xj'?
   10 |          for(int xj=0;x<=xi;xj++){
      |                       ^
      |                       xj
vision.cpp:13:62: error: expected ')' before ';' token
   13 |                      res.push_back(add_and({xi*W+yi,xj*W+yj});
      |                                   ~                          ^
      |                                                              )