Problem taken from DMOJ.
Problem Description
Little Caesar likes card games. Every time he comes to Zagreb, he plays blackjack, the famous card game, with his friends.
The game is played with a standard card deck. Each card is assigned a value based on their rank. Cards with numbers on them have a value equal to that number, face cards (Jacks, Queens, or Kings) all have a value of , and Aces have a value of 11.
In this game, the player draws cards while the sum of the cards in their hand is less than or equal to or until they say DOSTA
(Croatian for "STOP").
Little Caesar has found himself in an interesting situation. He has drawn cards already, whose values sum up to be less than or equal to 21, and he is unsure if he should draw more cards or stop.
You tell him that he shouldn't draw another card if at least half the cards left in the deck make his sum exceed 21.
He is having a tough time with figuring it out. Why don't you help him out?
Input Specification
The first line of input will an integer denoting how many cards Little Caesar has drawn. The next lines will contain the value of the card that he drew.
Output Specification
If Caesar should draw another card, print VUCI
(Croatian for "DRAW"). Otherwise, print DOSTA
.
Sample Input 1
6
2
3
2
3
2
3
Sample Output 1
DOSTA
Sample Input 2
2
5
6
Sample Output 2
VUCI
Comments