Borderou de evaluare (job #3162767)
Utilizator | Data | 29 octombrie 2023 20:31:39 | |
---|---|---|---|
Problema | Padure | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:18:26: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
18 | for (size_t i = 0; i < n; i++) {
| ~~^~~
main.cpp:19:30: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
19 | for (size_t j = 0; j < m; j++) {
| ~~^~~
main.cpp:43:85: error: 'function' is not a member of 'std'
43 | std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int>>, std::function<bool(const std::pair<int, int>&, const std::pair<int, int>&)>> pq(
| ^~~~~~~~
main.cpp:5:1: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
4 | #include <iostream>
+++ |+#include <functional>
5 |
main.cpp:43:153: error: expression list treated as compound expression in functional cast [-fpermissive]
43 | std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int>>, std::function<bool(const std::pair<int, int>&, const std::pair<int, int>&)>> pq(
| ^
main.cpp:43:154: error: template argument 3 is invalid
43 | std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int>>, std::function<bool(const std::pair<int, int>&, const std::pair<int, int>&)>> pq(
| ^~
main.cpp:44:13: error: cannot convert 'main()::<lambda(const std::pair<int, int>&, const std::pair<int, int>&)>' to 'int' in initialization
44 | [&](const std::pair<int, int>& a, const std::pair<int, int>& b) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| main()::<lambda(const std::pair<int, int>&, const std::pair<int, int>&)>
45 | // You can use the captured variable in your comparison
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | return distance[a.first][a.second] > distance[b.first][b.second];
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47 | }
| ~
main.cpp:49:8: error: request for member 'emplace' in 'pq', which is of non-class type 'int'
49 | pq.emplace(startRow, startCol);
| ^~~~~~~
main.cpp:51:16: error: request for member 'empty' in 'pq', which is of non-class type 'int'
51 | while (!pq.empty()) {
| ^~~~~
main.cpp:52:36: error: request for member 'top' in 'pq', which is of non-class type 'int'
52 | const auto [row, col] = pq.top();
| ^~~
main.cpp:53:12: error: request for member 'pop' in 'pq', which is of non-class type 'int'
53 | pq.pop();
| ^~~
main.cpp:68:20: error: request for member 'emplace' in 'pq', which is of non-class type 'int'
68 | pq.emplace(neighbor);
| ^~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !