Job 16884

Owner
Diana-Elena Ghinea
Problem
nMultiple
Contest
MindCoding 2016 Final 1
Source
1.00KB
Result
Compile error (Non-zero exit status: 1)

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) {
               ^

Questions?

Sponsors Gold