Borderou de evaluare (job #748004)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Creioane (clasa a 6-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 28 nov. 2023 09:18:39 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:17:5: error: 'function' was not declared in this scope
17 | function<int(int)> calculateHeight = [&](int i) -> int {
| ^~~~~~~~
main.cpp:4:1: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
3 | #include <algorithm>
+++ |+#include <functional>
4 |
main.cpp:17:14: error: expected primary-expression before 'int'
17 | function<int(int)> calculateHeight = [&](int i) -> int {
| ^~~
main.cpp:34:38: error: 'calculateHeight' was not declared in this scope
34 | max_height = max(max_height, calculateHeight(i));
| ^~~~~~~~~~~~~~~