Borderou de evaluare (job #3188638)
Utilizator | Data | 3 ianuarie 2024 16:39:40 | |
---|---|---|---|
Problema | Senat | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'int Graf::bfs(int, int, std::vector<int>&)':
main.cpp:16:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
16 | for (int i=0; i<parinte.size(); i++ ){
| ~^~~~~~~~~~~~~~~
main.cpp:22:24: error: 'INT_MAX' was not declared in this scope
22 | q.push({sursa, 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 <string>
main.cpp:22:15: error: no matching function for call to 'std::queue<std::pair<int, int> >::push(<brace-enclosed initializer list>)'
22 | q.push({sursa, INT_MAX});
| ~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/queue:64,
from main.cpp:3:
/usr/include/c++/12.2.1/bits/stl_queue.h:285: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> > >; value_type = std::pair<int, int>]'
285 | push(const value_type& __x)
| ^~~~
/usr/include/c++/12.2.1/bits/stl_queue.h:285:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::queue<std::pair<int, int> >::value_type&' {aka 'const std::pair<int, int>&'}
285 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_queue.h:290:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; value_type = std::pair<int, int>]'
290 | push(value_type&& __x)
| ^~~~
/usr/include/c++/12.2.1/bits/stl_queue.h:290: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>&&'}
290 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp: In member function 'void Solutie::Senat()':
main.cpp:98:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
98 | for (int j=0; j<linie.size(); j++) {
| ~^~~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !