This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define all(v) ((v).begin()), ((v).end())
#define sz(v) ((int)((v).size()))
typedef long long ll;
typedef vector<int> vi;
typedef vector<pair<ll , int> > vpli;
typedef set<char> st;
typedef stack<int> s;
typedef deque<int> dq;
typedef queue<int> q;
#define fast_io ios_base::sync_with_stdio(0); cin.tie(0)
int main()
{
ll n;
cin>>n;
ll arr[13]={4};
vector<ll>v(n);
ll sum;
for(int i=0; i<n; ++i){
cin>>v[i];
arr[v[i]-1]--;
sum+=v[i];
}
ll ans= 21-sum;
ll sum1=0;
ll sum2=0;
for(int i=ans; i<13; ++i){
sum1+=arr[i];
}
for(int i=ans-1; i>=0; --i){
sum2+=arr[i];
}
if(sum1>sum2){
cout<<"DOSTA";
}
else{
cout<<"VUCI";
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |