学校模拟赛的比赛题 考场上调了2次 还是WA的
#include<bits/stdc++.h>
using namespace std;
int n,a[53],num[12]={0,0,4,4,4,4,4,4,4,4,12,4},sum;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin>>n;
for(int i=1;i<=n;i++) {
cin>>a[i];
num[a[i]]--;
sum+=a[i];
}
if(sum>21) {
cout<<"DOSTA";
return 0;
}
int x=21-sum,p=0,q=0;
for(int i=2;i<=11;i++) {
if(i>x) {
p++;
}
else {
q++;
}
}
if(p>=q) {
cout<<"DOSTA";
}
else {
cout<<"VICA";
}
return 0;
}