2 solutions

  • 0
    @ 2025-6-21 9:58:47
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        bool jud=true;
        int n,now;
        cin>>n;
        for(int i=1;i<=n;i++)
        {
            int x;
            cin>>x;
            if(i==1) now=x;
            else
            {
                if(x>now && jud) now=x;
                else jud=false;
            }
        }
        cout<<now;
        return 0;
    }
    

    Information

    ID
    2333
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    49
    Accepted
    19
    Uploaded By