제출 #139444

#제출 시각아이디문제언어결과실행 시간메모리
139444reda경주 (Race) (IOI11_race)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std ; int best_path(int N,int K,int H[][],int L [] ) { int start = -1; int endr = -1; int mn = 1e9+7; for(int i = 0; i < L.size(); i++) { int currentSum = 0; for(int j = i; j < L.size()&& (j-i+1) < mn; j++) { currentSum += L[j]; if(currentSum == K) { start = i; endr = j; mn = endr- start + 1; break; } } } return mn; }

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

race.cpp:3:36: error: declaration of 'H' as multidimensional array must have bounds for all dimensions except the first
 int best_path(int N,int K,int  H[][],int L [] )
                                    ^
race.cpp:3:37: error: expected ')' before ',' token
 int best_path(int N,int K,int  H[][],int L [] )
                                     ^
race.cpp:3:38: error: expected unqualified-id before 'int'
 int best_path(int N,int K,int  H[][],int L [] )
                                      ^~~