Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 128M

Author:
Problem type

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 52 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 10, 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 21 or until they say DOSTA (Croatian for "STOP").

Little Caesar has found himself in an interesting situation. He has drawn N 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 N(1 \le N \le 52) denoting how many cards Little Caesar has drawn. The next N lines will contain the value of the i^{th} 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

There are no comments at the moment.