1 条题解

  • 0
    @ 2026-9-30 13:00:41

    C++ :

    
    #include <cstdio>
    int main(){
        int n;
        if(scanf("%d", &n) != 1) return 0;
        int best = -1, pos = 0;
        for(int i = 1; i <= n; i++){
            int x; scanf("%d", &x);
            if(x > best){ best = x; pos = i; }
        }
        printf("%d\n", pos);
        return 0;
    }
    
    
    • 1

    信息

    ID
    2889
    时间
    1000ms
    内存
    256MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者