Compiler output
prog.cpp: In function 'void rezolva()':
prog.cpp:52:14: error: request for member 'second' in 'suma.std::map<_Key, _Tp, _Compare, _Alloc>::operator[]<int, int, std::less<int>, std::allocator<std::pair<const int, int> > >((*(const key_type*)(& aux)))', which is of non-class type 'std::map<int, int>::mapped_type {aka int}'
suma[aux].second = i;
^
prog.cpp:55:15: error: request for member 'first' in 'suma.std::map<_Key, _Tp, _Compare, _Alloc>::operator[]<int, int, std::less<int>, std::allocator<std::pair<const int, int> > >((* &0))', which is of non-class type 'std::map<int, int>::mapped_type {aka int}'
if (suma[0].first) {
^