Borderou de evaluare (job #1382209)

Utilizator robertstrecheStreche Robert robertstreche Data 8 martie 2015 16:27:50
Problema TwoSets Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:20:20: error: two or more data types in declaration of ‘type name’ unordered_map <int int>hash1,hash2; ^ user.cpp:20:23: error: wrong number of template arguments (1, should be 5) unordered_map <int int>hash1,hash2; ^ In file included from /usr/include/c++/4.8/unordered_map:48:0, from user.cpp:5: /usr/include/c++/4.8/bits/unordered_map.h:97:11: error: provided for ‘template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> class std::unordered_map’ class unordered_map : __check_copy_constructible<_Alloc> ^ user.cpp:20:29: error: invalid type in declaration before ‘,’ token unordered_map <int int>hash1,hash2; ^ user.cpp: In function ‘bool solve()’: user.cpp:25:11: error: request for member ‘clear’ in ‘hash1’, which is of non-class type ‘int’ hash1.clear(); ^ user.cpp:26:11: error: request for member ‘clear’ in ‘hash2’, which is of non-class type ‘int’ hash2.clear(); ^ user.cpp:49:18: error: invalid types ‘int[int]’ for array subscript hash1[nr1]++, ^ user.cpp:50:18: error: invalid types ‘int[int]’ for array subscript hash2[nr2]++; ^ user.cpp:70:22: error: invalid types ‘int[int]’ for array subscript if (hash1[nr1]==0 || hash2[nr2]==0)return 0; ^ user.cpp:70:40: error: invalid types ‘int[int]’ for array subscript if (hash1[nr1]==0 || hash2[nr2]==0)return 0; ^

Ceva nu functioneaza?