제출 #581454

#제출 시각아이디문제언어결과실행 시간메모리
581454jasminWall (IOI14_wall)C++17
컴파일 에러
0 ms0 KiB
#include<wall.h>
#include<bits/stdc++.h>
using namespace std;

void buildWallsmall(int n, int k, vector<int> op, vector<int> left, vector<int> right, 
            vector<int> hight, vector<int> finalHight){

    for(int i=0; i<k; i++){

        for(int j=left[i]; j<=right[i]; j++){
            if(op[i]==1){
                finalHight[j]=max(finalHight[j], hight[i]);
            }
            else{
                finalHight[j]=min(finalHight[j], hight[i]);
            }
        }
    }
}

void buildWall(int n, int k, signed op[], signed left[], signed[] right, 
            signed hight[], signed finalHight[]){

    if(n<=1e4){
        buildWallsmall(n, k, op, left, right, hight, finalHight);
    }

}

컴파일 시 표준 에러 (stderr) 메시지

wall.cpp:21:67: error: expected ',' or '...' before 'right'
   21 | void buildWall(int n, int k, signed op[], signed left[], signed[] right,
      |                                                                   ^~~~~
wall.cpp: In function 'void buildWall(int, int, int*, int*, int*)':
wall.cpp:25:47: error: 'hight' was not declared in this scope
   25 |         buildWallsmall(n, k, op, left, right, hight, finalHight);
      |                                               ^~~~~
wall.cpp:25:54: error: 'finalHight' was not declared in this scope
   25 |         buildWallsmall(n, k, op, left, right, hight, finalHight);
      |                                                      ^~~~~~~~~~