1 solutions

  • 1
    @ 2025-8-7 16:43:27

    自己写

    #include <iostream>
    using namespace std;
    long long n, a = 0, b;
    
    int main() {
    	cin >> n;
    
    	for (int i = 0; i < n; i++) {
    		b = a;
    		cin >> a;
    		if (a <= b) {
    			cout << b;
    			return 0;
    		}
    	}
    	cout << a;
    	return 0;
    }
    
    

    Information

    ID
    17968
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    7
    Tags
    (None)
    # Submissions
    264
    Accepted
    64
    Uploaded By