Submission #884291

#TimeUsernameProblemLanguageResultExecution timeMemory
884291vjudge1COCI17_cezar (COCI17_cezar)C++17
0 / 50
1 ms348 KiB
#ifndef Local #pragma GCC optimize("O3,unroll-loops") const int lim=2e5+100; #else const int lim=2e3+100; #endif #include "bits/stdc++.h" using namespace std; #define int int64_t #define pb push_back const int mod=1e9+7; using pii=pair<int,int>; inline void solve(){ int n; cin>>n; int numofcards[12]{0,0,4,4, 4,4,4,4,4, 4,16,4}; int val=0; for(int i=0;i<n;i++){ int tem; cin>>tem; val+=tem; numofcards[tem]--; } int left=21-val; int lesser=0,great=0; for(int i=left+1;i<12;i++){ great+=numofcards[i]; } lesser=52-n-great; for(int i:numofcards){ cerr<<i<<" "; }cerr<<"\n"; cerr<<lesser<<" "<<great<<"\n"; if(lesser>great){ cout<<"DOSTA\n"; } else{ cout<<"VUCI\n"; } } signed main(){ ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL); #ifdef Local freopen(".in","r",stdin); freopen(".out","w",stdout); #else //freopen("grass.in","r",stdin); //freopen("grass.out","w",stdout); #endif int t=1; //cin>>t; while (t--) { solve(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...