Borderou de evaluare (job #2866005)

Utilizator RalucaioneteRalucaIonete Ralucaionete Data 9 martie 2022 12:08:22
Problema Muzeu Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void lee()': main.cpp:35:33: error: invalid types 'int[int]' for array subscript 35 | if(inmat(iv,jv) && d[iv][jv]==-1) | ^ main.cpp:37:18: error: invalid types 'int[int]' for array subscript 37 | d[iv][jv]=d[x][y]+1; | ^ main.cpp:37:28: error: invalid types 'int[int]' for array subscript 37 | d[iv][jv]=d[x][y]+1; | ^ main.cpp: In function 'int main()': main.cpp:51:14: error: 'i' was not declared in this scope 51 | if(s[i][j]=='p') | ^ main.cpp:54:24: error: no matching function for call to 'std::queue<std::pair<int, int> >::push(<brace-enclosed initializer list>)' 54 | q.push({i, j}); | ^ In file included from /usr/include/c++/10/queue:64, from main.cpp:3: /usr/include/c++/10/bits/stl_queue.h:265: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> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>]' 265 | push(const value_type& __x) | ^~~~ /usr/include/c++/10/bits/stl_queue.h:265:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'} 265 | push(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_queue.h:270:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>]' 270 | push(value_type&& __x) | ^~~~ /usr/include/c++/10/bits/stl_queue.h:270: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>&&'} 270 | push(value_type&& __x) | ~~~~~~~~~~~~~^~~ main.cpp:65:9: error: 'i' was not declared in this scope 65 | for(i=1;i<=n;i++) | ^ main.cpp:67:13: error: 'j' was not declared in this scope 67 | for(j=1;j<=n;j++) | ^ main.cpp:68:21: error: expected ';' before ']' token 68 | fout<<di][j]<<" "; | ^ | ; Non zero exit status: 1

Ceva nu functioneaza?