# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
472714 | MamdouhN | COCI17_cezar (COCI17_cezar) | C++14 | 1 ms | 272 KiB |
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 int long long
#define endl "\n"
vector<int>allcards;
main()
{
for(int i=2;i<=14;i++)
{
int x = i;
if(i>11) x =10;
allcards.push_back(x);
allcards.push_back(x);
allcards.push_back(x);
allcards.push_back(x);
}
int deck = 52;
//cout<<allcards.size()<<endl;
//for(auto v:allcards)cout<<v<<" ";
//cout<<endl;
sort(allcards.begin(),allcards.end());
int n;
cin>>n;
int sum = 0;
for(int i=0;i<n;i++)
{
int x;
cin>>x;
for(int i=0;i<allcards.size();i++)
if(allcards[i]==x)allcards[i]=0;
deck--;
sum+=x;
}
sum = 21-sum;
int greate=0;
for(int i=0;i<allcards.size();i++)if(allcards[i]>sum)greate++;
if(greate>=deck-greate)cout<<"DOSTA"<<endl;
else cout<<"VUCI"<<endl;
}
Compilation message (stderr)
# | 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... |