Submission #171870

#TimeUsernameProblemLanguageResultExecution timeMemory
171870ToniBCOCI17_cezar (COCI17_cezar)C++14
50 / 50
2 ms376 KiB
#include <iostream> #include <algorithm> #include <string> using namespace std; int main(){ int n; cin>>n; int all[n]; int sv[11] = {0, 4, 4, 4, 4, 4, 4, 4, 4, 16, 4}, uk = 0; for(int i=0;i<n;++i){ cin >> all[i]; sv[all[i] - 1] -= 1; uk += all[i]; } int raz = 21 - uk; int m = 0, v = 0; for(int i = 0; i < 11; ++i){ if(i + 1 <= raz){ m += sv[i]; } else{ v += sv[i]; } } if(m > v){ cout << "VUCI"; } else{ cout << "DOSTA"; } 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...