运行 ID: 91438

Main.cc: In function ‘int main()’:
Main.cc:19:32: error: no matching function for call to ‘max_element(int [105])’
     int maxn = *max_element(sum);
                                ^
In file included from /usr/include/c++/7/algorithm:62:0,
                 from Main.cc:1:
/usr/include/c++/7/bits/stl_algo.h:5668:5: note: candidate: template _FIter std::max_element(_FIter, _FIter)
     max_element(_ForwardIterator __first, _ForwardIterator __last)
     ^~~~~~~~~~~
/usr/include/c++/7/bits/stl_algo.h:5668:5: note:   template argument deduction/substitution failed:
Main.cc:19:32: note:   candidate expects 2 arguments, 1 provided
     int maxn = *max_element(sum);
                                ^
In file included from /usr/include/c++/7/algorithm:62:0,
                 from Main.cc:1:
/usr/include/c++/7/bits/stl_algo.h:5693:5: note: candidate: template _FIter std::max_element(_FIter, _FIter, _Compare)
     max_element(_ForwardIterator __first, _ForwardIterator __last,
     ^~~~~~~~~~~
/usr/include/c++/7/bits/stl_algo.h:5693:5: note:   template argument deduction/substitution failed:
Main.cc:19:32: note:   candidate expects 3 arguments, 1 provided
     int maxn = *max_element(sum);
                                ^