1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e9 + 10; const int mod = 1e9 + 7; int num[120]; int (){ int t; scanf("%d", &t); while (t--){ int n,a; memset(num, 0, sizeof(num)); scanf("%d", &n); for (int i = 0; i < n; i++){ scanf("%d", &a); num[a]++; } int b = 0; a = 0; for (int i = 0; i <= 100; i++){ if (num[i] >= a)b = i,a=num[i]; } printf("%dn", b);
} return 0; }
|
近期评论