RE,求调

题目总版

Fearlessjide @ 2024-11-17 11:46:00

#include<bits/stdc++.h>
using namespace std;
long long n,m,bucket[200005];
int main(){
    ios::sync_with_stdio(false);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>m;
        bucket[m]++;
    }
    for(int i=1;i<=200005;i++){
        if(bucket[i]>=1)
            cout<<i<<" "<<bucket[i]<<endl;
    }
    return 0;
}

by FFFuuuFFFuuu @ 2024-11-17 11:50:59

数组下标超限了


by VVinky_ @ 2024-11-19 12:19:52

for(int i=1; i < 200005; i++)


|