Borderou de evaluare (job #2475562)
Utilizator | Data | 17 octombrie 2019 09:41:29 | |
---|---|---|---|
Problema | Sate | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void bfs(int)':
main.cpp:28:14: error: request for member 'first' in 'x', which is of non-class type 'int'
if(!viz[x.first]){
^~~~~
main.cpp:29:14: error: request for member 'first' in 'x', which is of non-class type 'int'
q.push(x.first);
^~~~~
main.cpp:30:11: error: request for member 'first' in 'x', which is of non-class type 'int'
viz[x.first]=1;
^~~~~
main.cpp:31:16: error: request for member 'first' in 'x', which is of non-class type 'int'
if(nod > x.first)
^~~~~
main.cpp:32:13: error: request for member 'first' in 'x', which is of non-class type 'int'
dist[x.first] = dist[nod] - x.second;
^~~~~
main.cpp:32:36: error: request for member 'second' in 'x', which is of non-class type 'int'
dist[x.first] = dist[nod] - x.second;
^~~~~~
main.cpp:34:13: error: request for member 'first' in 'x', which is of non-class type 'int'
dist[x.first] = dist[nod] + x.second;
^~~~~
main.cpp:34:36: error: request for member 'second' in 'x', which is of non-class type 'int'
dist[x.first] = dist[nod] + x.second;
^~~~~~
main.cpp:35:10: error: request for member 'first' in 'x', which is of non-class type 'int'
if(x.first == y)
^~~~~
main.cpp: In function 'int main()':
main.cpp:46:33: error: no matching function for call to 'std::vector<int>::push_back(std::pair<int, int>)'
v[i].push_back(make_pair(j, d));
^
In file included from /usr/include/c++/6/vector:64:0,
from /usr/include/c++/6/queue:61,
from main.cpp:3:
/usr/include/c++/6/bits/stl_vector.h:914:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:914:7: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'const value_type& {aka const int&}'
/usr/include/c++/6/bits/stl_vector.h:932:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:932:7: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<int>::value_type&& {aka int&&}'
main.cpp:47:33: error: no matching function for call to 'std::vector<int>::push_back(std::pair<int, int>)'
v[j].push_back(make_pair(i, d));
^
In file included from /usr/include/c++/6/vector:64:0,
from /usr/include/c++/6/queue:61,
from main.cpp:3:
/usr/include/c++/6/bits/stl_vector.h:914:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !