제출 #395336

#제출 시각아이디문제언어결과실행 시간메모리
395336irmuun벽 칠하기 (APIO20_paint)C++17
컴파일 에러
0 ms0 KiB
#include "paint.h" #include<bits/stdc++.h> using namespace std; int a,b,c,d,e,i,j,k,be[100000],col[100000]; minimumInstructions(int N, int M, int K, vector <int> C, vector <int> A, vector < vector<int> > B){ for(i=0;i<K;i++){ be[i]=-1; col[i]=0; } for(i=0;i<M;i++){ col[B[i][0]]=1; for(j=1;j<A[i];j++){ be[B[i][j]]=B[i][j-1]; col[B[i][j]]=1; } } d=1; for(i=0;i<N-1;i++){ if(col[C[i]]==0){ return -1; } if(be[C[i+1]]!=C[i]){ d++; } } return d; }

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

paint.cpp:5:98: error: ISO C++ forbids declaration of 'minimumInstructions' with no type [-fpermissive]
    5 | minimumInstructions(int N, int M, int K, vector <int> C, vector <int> A, vector < vector<int> > B){
      |                                                                                                  ^