Borderou de evaluare (job #2306914)
Utilizator | Data | 23 decembrie 2018 11:13:25 | |
---|---|---|---|
Problema | Algoritmul Bellman-Ford | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:25:12: error: conflicting declaration 'int v [50005]'
int v[50005];
^
main.cpp:22:13: note: previous declaration as 'std::vector<int> v'
vector<int> v;
^
main.cpp: In function 'bool bellmanford(int)':
main.cpp:29:5: error: 'viz' was not declared in this scope
viz[i] = 0;
^~~
main.cpp:39:5: error: 'viz' was not declared in this scope
viz[nodcurent]++;
^~~
main.cpp:43:44: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka struct std::pair<int, int>}' has no member named 'size'
for (size_t i = 0; i < graf[nodcurent].size(); i++) {
^~~~
main.cpp:44:34: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' and 'size_t {aka long unsigned int}')
int vecin = graf[nodcurent][i].first;
^
main.cpp:45:33: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' and 'size_t {aka long unsigned int}')
int cost = graf[nodcurent][i].second;
^
main.cpp:49:22: error: could not convert 'coada.std::queue<_Tp, _Sequence>::push<int, std::deque<int, std::allocator<int> > >(vecin)' from 'void' to 'bool'
!coada.push(vecin);
~~~~~~~~~~^~~~~~~
main.cpp:49:28: error: in argument to unary !
!coada.push(vecin);
^
main.cpp: In function 'int main()':
main.cpp:60:13: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka struct std::pair<int, int>}' has no member named 'push_back'
graf[x].push_back(make_pair(y, c));
^~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !