This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
N=int(input())
# S - lista broja karata koje nose određeni broj bodova, početni špil
S=[]
for i in range(12):
if i==0 or i==1:
S.append(0)
if i>1 and i<10:
S.append(4)
if i==10:
S.append(12)
if i==11:
S.append(4)
#print (S)
# L - lista izvučenih brojeva
L=[]
for i in range(N):
# V - vrijednost, broj bodova izvučene karte
V=int(input())
L.append(V)
S[V]-=1
# X predstavlja razliku između 21 i brojeva koje sam izvukao
X=21-sum(L)
# BVX - broj prostalih karata većih od X
# BMX - broj preostlih karata manjih od X
BVX=0
BMX=0
for i in range(12):
if X<=i:
BVX+=S[i]
else:
BMX+=S[i]
if BVX>=BMX:
print('DOSTA')
else:
print('VUCI')
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |