Borderou de evaluare (job #2313580)

Utilizator BlaugranasEnal Gemaledin Blaugranas Data 7 ianuarie 2019 10:00:46
Problema Algoritmul lui Dijkstra Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:14:22: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int') d[i]=I,p[i]=-1; ^ In file included from /usr/include/c++/6/vector:69:0, from main.cpp:3: /usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>] vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/6/bits/vector.tcc:167:5: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&' In file included from /usr/include/c++/6/vector:64:0, from main.cpp:3: /usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>] operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:450:7: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&' /usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>] operator=(initializer_list<value_type> __l) ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:471:7: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>' main.cpp:15:11: error: request for member 'push_back' in 'h', which is of non-class type 'std::vector<int> [50001]' for(h.push_back(1),k=h.size();k;) ^~~~~~~~~ main.cpp:15:28: error: request for member 'size' in 'h', which is of non-class type 'std::vector<int> [50001]' for(h.push_back(1),k=h.size();k;) ^~~~ main.cpp:17:14: error: cannot convert 'std::vector<int>' to 'int' in assignment i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^ main.cpp:17:35: error: no match for 'operator[]' (operand types are 'std::vector<int> [50001]' and 'std::vector<int>') i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^ main.cpp:17:56: error: request for member 'begin' in 'h', which is of non-class type 'std::vector<int> [50001]' i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^~~~~ main.cpp:17:66: error: request for member 'end' in 'h', which is of non-class type 'std::vector<int> [50001]' i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^~~ main.cpp:17:85: error: request for member 'begin' in 'p', which is of non-class type 'std::vector<int> [50001]' i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^~~~~ main.cpp:17:95: error: request for member 'end' in 'p', which is of non-class type 'std::vector<int> [50001]' i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^~~ main.cpp:22:30: error: no match for 'operator!=' (operand types are 'std::vector<int>' and 'int') if(p[a[i][j]]!=-1) ~~~~~~~~~~^~~~ In file included from /usr/include/c++/6/utility:70:0, from /usr/include/c++/6/algorithm:60, from main.cpp:2: Non zero exit status: 1

Ceva nu functioneaza?