2 solutions

  • 0
    @ 2025-8-5 14:45:11

    #include<bits/stdc++.h> using namespace std; int n; int main(){ cin>>n; int t; int maxn=0; for(int i=1;i<=n;i++){ cin>>t; if(t>maxn){ maxn=t; } } cout<<maxn; return 0; }

    • 0
      @ 2024-12-11 20:26:30

      #include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int maxv; for(int i=1;i<=n;i++) { int x; cin>>x; if(i==1||x>maxv) { maxv=x; } } cout<<maxv; return 0; }

      • 1

      Information

      ID
      873
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      (None)
      # Submissions
      168
      Accepted
      78
      Uploaded By