Borderou de evaluare (job #3193696)

Utilizator alexnohai04Nohai Alexandru alexnohai04 Data 15 ianuarie 2024 13:57:28
Problema Cartite Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void DFS(int)': main.cpp:76:23: warning: comparison of integer expressions of different signedness: 'std::stack<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare] 76 | if (Traseu.size() == nrGal + 1) { | ~~~~~~~~~~~~~~^~~~~~~~~~~~ main.cpp: In function 'int main()': main.cpp:130:17: error: 'nod' was not declared in this scope 130 | fout << nod.x << ' ' << nod.y << ' ' << distGal[nod.x][nod.y] - 1 << '\n'; | ^~~ main.cpp:133:21: error: 'nod' was not declared in this scope 133 | DFS(indGal[{nod.x, nod.y}]); | ^~~ main.cpp:133:19: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>' and '<brace-enclosed initializer list>') 133 | DFS(indGal[{nod.x, nod.y}]); | ^ In file included from /usr/include/c++/12.2.1/map:61, from main.cpp:4: /usr/include/c++/12.2.1/bits/stl_map.h:502:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; mapped_type = int; key_type = std::pair<int, int>]' 502 | operator[](const key_type& __k) | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_map.h:502:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::map<std::pair<int, int>, int>::key_type&' {aka 'const std::pair<int, int>&'} 502 | operator[](const key_type& __k) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_map.h:522:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; mapped_type = int; key_type = std::pair<int, int>]' 522 | operator[](key_type&& __k) | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_map.h:522:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::pair<int, int>, int>::key_type&&' {aka 'std::pair<int, int>&&'} 522 | operator[](key_type&& __k) | ~~~~~~~~~~~^~~ main.cpp: In function 'Pozitie Lee()': main.cpp:70:1: warning: control reaches end of non-void function [-Wreturn-type] 70 | } | ^ Non zero exit status: 1

Ceva nu functioneaza?