这题的m没有一点作用啊??
#include<cstdio> #include<vector> using namespace std; int main(){ int n , m ; scanf("%d%d",&n,&m); int arr[n]; int count[n]; for(int i = 0 ; i <n ; ++i){ count[i] = 0; } for(int i = 0 ; i < n ; ++i){ scanf("%d",&arr[i]); } for(int i = 0 ; i < n ;++i){ for(int j = i+1 ; j <n ;++j){ if(arr[i] == arr[j]){ ++count[i]; ++count[j]; } } } for(int i = 0 ;i < n;++i){ if(count[i] != 0){ printf("%d\n",count[i]); }else{ printf("BeiJu\n"); } } }