Borderou de evaluare (job #2923430)

Utilizator KarinaDKarina Dumitrescu KarinaD Data 13 septembrie 2022 18:19:36
Problema Emacs Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:10:16: error: two or more data types in declaration of 'type name' 10 | vector < pair <int int> > e; | ^~~ main.cpp:10:23: error: wrong number of template arguments (1, should be 2) 10 | vector < pair <int int> > e; | ^ In file included from /usr/include/c++/10/bits/stl_algobase.h:64, from /usr/include/c++/10/bits/char_traits.h:39, from /usr/include/c++/10/ios:40, from /usr/include/c++/10/ostream:38, from /usr/include/c++/10/iostream:39, from main.cpp:1: /usr/include/c++/10/bits/stl_pair.h:211:12: note: provided for 'template<class _T1, class _T2> struct std::pair' 211 | struct pair | ^~~~ main.cpp:10:25: error: template argument 1 is invalid 10 | vector < pair <int int> > e; | ^ main.cpp:10:25: error: template argument 2 is invalid main.cpp:17:17: error: 'int rmq(int)' redeclared as different kind of entity 17 | int rmq ( int n ){ | ^ main.cpp:15:5: note: previous declaration 'int rmq [20][100005]' 15 | int rmq[20][MAX_N]; | ^~~ main.cpp: In function 'int rmq(int)': main.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type] 22 | } | ^ main.cpp: In function 'int main()': main.cpp:45:17: error: invalid types 'int[int]' for array subscript 45 | fin >> e[i].first; | ^ main.cpp:46:10: error: invalid types 'int[int]' for array subscript 46 | e[i].second = i; | ^ main.cpp:51:9: error: redeclaration of 'int pos1' 51 | int pos1 = 0, pos2 = 0; | ^~~~ main.cpp:36:9: note: 'int pos1' previously declared here 36 | int pos1, pos2; | ^~~~ main.cpp:51:19: error: redeclaration of 'int pos2' 51 | int pos1 = 0, pos2 = 0; | ^~~~ main.cpp:36:15: note: 'int pos2' previously declared here 36 | int pos1, pos2; | ^~~~ main.cpp:55:18: error: invalid types 'int[int]' for array subscript 55 | while ( e[pos2].first ==e[pos1].first ) Non zero exit status: 1

Ceva nu functioneaza?