Borderou de evaluare (job #2909123)
Utilizator | Data | 9 iunie 2022 16:02:34 | |
---|---|---|---|
Problema | Alpin | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int longestIncreasingPath(std::vector<std::vector<int> >&)':
main.cpp:37:5: error: 'function' was not declared in this scope
37 | function<int(int, int, int)> dfs;
| ^~~~~~~~
main.cpp:7:1: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
6 | #include <algorithm>
+++ |+#include <functional>
7 |
main.cpp:37:31: error: expression list treated as compound expression in functional cast [-fpermissive]
37 | function<int(int, int, int)> dfs;
| ^
main.cpp:37:14: error: expected primary-expression before 'int'
37 | function<int(int, int, int)> dfs;
| ^~~
main.cpp:38:5: error: 'dfs' was not declared in this scope
38 | dfs = [&](int row, int col, int prev)
| ^~~
main.cpp: In lambda function:
main.cpp:42:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
42 | row >= matrix.size() ||
| ~~~~^~~~~~~~~~~~~~~~
main.cpp:43:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
43 | col >= matrix[0].size() ||
| ~~~~^~~~~~~~~~~~~~~~~~~
main.cpp:54:49: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
54 | dfs(row, col + 1, matrix[row][col])}) + 1;
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from main.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
main.cpp:54:49: note: candidate expects 2 arguments, 1 provided
54 | dfs(row, col + 1, matrix[row][col])}) + 1;
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from main.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
main.cpp:54:49: note: candidate expects 3 arguments, 1 provided
54 | dfs(row, col + 1, matrix[row][col])}) + 1;
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !