Submission #679427

#TimeUsernameProblemLanguageResultExecution timeMemory
679427kilikumaWall (IOI14_wall)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include <wall.h> using namespace std; void buildWall(int N, int K, int operations[], int gauche[], int droite[], int hauteur[], int hauteurFinale[]) { for (int i = 0; i < N; i ++) hauteurFinale[i] = 0; for (int iOperation = 0; iOperation < K; iOperation ++) { if (operation[iOperation] == 1) { for (int indice = gauche[iOperation]; indice <= droite[iOperation]; indice ++) { if (hauteurFinale[indice] <= hauteur[iOperation]) hauteurFinale[indice] = hauteur[iOperation]; } } else { for (int indice = gauche[iOperation]; indice <= droite[iOperation]; indice ++) { if (hauteurFinale[indice] >= hauteur[iOperation]) hauteurFinale[indice] = hauteur[iOperation]; } } } }

Compilation message (stderr)

wall.cpp: In function 'void buildWall(int, int, int*, int*, int*, int*, int*)':
wall.cpp:8:9: error: 'operation' was not declared in this scope; did you mean 'operations'?
    8 |     if (operation[iOperation] == 1) {
      |         ^~~~~~~~~
      |         operations