Submission #141658

#TimeUsernameProblemLanguageResultExecution timeMemory
141658MihaelaCismaruCOCI17_cezar (COCI17_cezar)C++14
30 / 50
3 ms376 KiB
#include<iostream> using namespace std; int a,x,les,gre,n,sum; int deck[12] = {0,0,4,4,4,4,4,4,4,4,12,4}; int main (void) { cin >> n; for (int i = 1; i <= n; i ++) { cin >> a; deck[a] --; sum += a; x = 21-sum; les = 0; gre = 0; for (int j = 2; j < x; j ++) { les += j*deck[j]; } for (int j = x; j <= 11; j ++) { gre += j*deck[j]; } if (les < gre || x < 0) { cout << "DOSTA"; return 0; } } 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...