Submission #928987

#TimeUsernameProblemLanguageResultExecution timeMemory
928987NourWaelCOCI17_cezar (COCI17_cezar)C++17
50 / 50
1 ms856 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int cnt[15]; signed main() { int n,sum=0; cin>>n; for(int i=2; i<=11; i++) cnt[i]+=4; cnt[10] += 2*4; for(int i=0; i<n; i++) { int x; cin>>x; sum+=x; cnt[x]--; } int x = 21-sum, n1 = 0, n2 = 0; for(int i=2; i<=11; i++) { if(i>x) n2+=cnt[i]; else n1+=cnt[i]; } //cout<<sum<<' '<<x<<' '<<n2<<' '<<n1<<' '; cout<<(n2>=n1? "DOSTA":"VUCI"); return 0; }
#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...