刚开始自信满满,到头来怀疑人生...为什么只得10分啊
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int a[100005];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n,w=0,m=0;
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a[i];
if(a[i]==0)
{
w++;
}
else
{
m++;
}
}
cout<<min(w,m)*2;
return 0;
}
一道普及/提高−的题应该也不可能这么简单 求助大佬