Run id: 155703

Main.cc: In function 'int main()':
Main.cc:7:2: error: 'cin' was not declared in this scope
  cin>>M;
  ^
Main.cc:7:2: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
Main.cc:13:31: error: 'max_element' was not declared in this scope
  int maxVal=*max_element(a,a+M);
                               ^
Main.cc:13:31: note: suggested alternative:
In file included from /usr/include/c++/5/algorithm:62:0,
                 from Main.cc:2:
/usr/include/c++/5/bits/stl_algo.h:5529:5: note:   'std::max_element'
     max_element(_ForwardIterator __first, _ForwardIterator __last,
     ^
Main.cc:14:31: error: 'min_element' was not declared in this scope
  int minVal=*min_element(a,a+M);
                               ^
Main.cc:14:31: note: suggested alternative:
In file included from /usr/include/c++/5/algorithm:62:0,
                 from Main.cc:2:
/usr/include/c++/5/bits/stl_algo.h:5467:5: note:   'std::min_element'
     min_element(_ForwardIterator __first, _ForwardIterator __last,
     ^
Main.cc:15:2: error: 'cout' was not declared in this scope
  cout<& __os)
     ^
Main.cc:14:6: warning: unused variable 'minVal' [-Wunused-variable]
  int minVal=*min_element(a,a+M);
      ^