Borderou de evaluare (job #2961014)
Utilizator | Data | 5 ianuarie 2023 16:06:01 | |
---|---|---|---|
Problema | Flux maxim | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int BFS(int, int, std::vector<int>&)':
main.cpp:20:21: error: 'INT_MAX' was not declared in this scope
20 | q.push({ start, INT_MAX });
| ^~~~~~~
main.cpp:4:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
3 | #include <queue>
+++ |+#include <climits>
4 | #include <vector>
main.cpp:20:30: error: no matching function for call to 'std::queue<std::pair<int, int> >::push(<brace-enclosed initializer list>)'
20 | q.push({ start, INT_MAX });
| ^
In file included from /usr/include/c++/10/queue:64,
from main.cpp:3:
/usr/include/c++/10/bits/stl_queue.h:265:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>]'
265 | push(const value_type& __x)
| ^~~~
/usr/include/c++/10/bits/stl_queue.h:265:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'}
265 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_queue.h:270:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>]'
270 | push(value_type&& __x)
| ^~~~
/usr/include/c++/10/bits/stl_queue.h:270:25: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::queue<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'}
270 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp: In function 'int MaxFlow(int, int)':
main.cpp:50:21: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
50 | while (new_flow = BFS(start, end, parent))
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !