Submission #141540

#TimeUsernameProblemLanguageResultExecution timeMemory
141540radugheoCOCI17_cezar (COCI17_cezar)C++14
50 / 50
3 ms380 KiB
#include <iostream> using namespace std; int n, i, x, mana, dif, nr1, nr2; int f[12]; int main(){ for (i=2; i<=11; i++){ f[i] = 4; } f[10] = 16; cin >> n; for (i=1; i<=n; i++){ cin >> x; if (x == 12 || x == 13 || x == 14){ f[10]--; } else{ f[x]--; } mana += x; } dif = 21 - mana; for (i=dif+1; i<=11; i++){ nr1 += f[i]; } nr2 = 52 - n - nr1; if (nr1 >= nr2){ cout << "DOSTA"; } else{ cout << "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...