#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ll n;cin>>n;
map<string,ll>fr;
ll x=0;
for(ll i=0;i<n;i++){
int k;cin>>k;
x+=k;
fr[to_string(k)]++;
}
x=21-x;
if(x>10){
cout<<"VUCI"<<endl;return 0;
}
for(int i=1;i<10;i++){
string y=to_string(i);
fr[y]=4-fr[y];
}
fr["Ace"]=4-fr["Ace"];
fr["Jack"]=4-fr["Jack"];
fr["Queen"]=4-fr["Queen"];
fr["King"]=4-fr["King"];
ll cnt1=0,cnt2=0;
for(int i=x+1;i<10;i++){
string y=to_string(i);
cnt1+=fr[y];
}
for(int i=1;i<=x;i++){
string y=to_string(i);
cnt2+=fr[y];
}
cnt1+=fr["Ace"]+fr["Jack"]+fr["Queen"]+fr["King"];
if(x==10){
cnt1-=fr["Jack"]+fr["Queen"]+fr["King"];
cnt2+=fr["Jack"]+fr["Queen"]+fr["King"];
}
if(cnt1>cnt2){
cout<<"DOSTA"<<endl;
}
else{
cout<<"VUCI"<<endl;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |