题目大意

题目大意

分析

结论

tt 为最小值

if t>n/2,then Bobif \ t > n/2 , then \ Bob

else Aliceelse \ Alice

Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
signed main()
{
int n;cin>>n;
vector<int> a(n+1);
int sum = 0;
for(int i = 1;i <= n;i++) cin >> a[i];
int t = *min_element(a.begin()+1,a.end());
int cnt = 0;
for(int i = 1;i <= n;i++){
if(a[i] == t) cnt++;
}

if(cnt > n/2) puts("Bob");
else puts("Alice");
return 0;
}