Submission #910006

#TimeUsernameProblemLanguageResultExecution timeMemory
910006vjudge1Race (IOI11_race)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

int best_path(int N,int K,int H[][],int L[]){
	for (int i =1; i<n; i++){
		int sum;
		for (int ii = 0; ii <n-i;ii++){
			for (int j = 0; j<i;j++){
			sum += L[j+ii];
			}
			if (sum == K)return ii;
			sum = 0;
		}
	}
}

Compilation message (stderr)

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