Advertisement
Guest User

Untitled

a guest
Jun 9th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include<fstream>
  2. using namespace std;
  3. int const MAXN=1000000;
  4. int main()
  5. {
  6. ifstream in("input.txt");
  7. ofstream out("output.txt");
  8. int A[MAXN], n;
  9. in>>n;
  10. for(int i=0;i<n;i++)
  11. in>>A[i];
  12. int max_value=A[0];
  13. for(int i=1;i<n;i++)
  14. if(A[i]>max_value)
  15. max_value=A[i];
  16. out<<max_value;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement