1 solutions

  • 0
    @ 2026-10-21 21:13:22
    #include<iostream>
    using namespace std;
    int main()
    {
        int N;
        cin >> N;
        int H[50];
        for (int i = 0; i < N; i++ )
        {
            cin >> H[i];
        }
        int x;
        cin >> x;
        int point = N + 1;
        for (int i = 0; i < N; i++) 
        {
            if (x < H[i])
            {
                point = i + 1;
                break;
            }
        }
        cout << point <<endl;
    
    }
    

    Information

    ID
    2
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    # Submissions
    105
    Accepted
    21
    Uploaded By