P28357 [洛谷] [COCI2017-2018#1] Cezar
普及
题目描述

Problem Description

Little Caesar likes card games. Every time he comes to Zagreb, he plays blackjack, a popular card game, with his friends.

In this game, the player draws cards while the sum of the cards in his hand is less than or equal to 21 or until he says "DOSTA" (Croatian for "STOP").

At the beginning of the game, there are 52 cards in the deck—thirteen ranks of each of the four suits. The card ranks are two, three, ..., ten, Jack, Queen, King, and Ace. The card values are as follows: the cards with numbers on them are worth that number (e.g., "nine" is 9), the cards with pictures (Jack, Queen, and King) are worth 10, whereas the Ace is worth 11.

Caesar finds himself in an interesting situation. During the game, he has already drawn \( N \) cards whose sum is less than or equal to 21 and is now considering whether to draw one more card or not. Let \( X \) be the difference between the sum of the cards so far and 21. It is known that you should not draw a card if the number of remaining cards in the deck whose value is greater than \( X \) is greater than or equal to the number of remaining cards in the deck whose value is less than or equal to \( X \).

Since Caesar is having a hard time deciding whether he needs to draw another card or not, he is asking you to help him with the calculation and decision.

Input Format

The first line of input contains a positive integer \( N \) (\( 1 \leq N \leq 52 \)), the number of cards Caesar has drawn so far.

Each of the following \( N \) lines contains a single positive integer, the value of the \( i \)-th card Caesar drew.

Output Format

If Caesar should draw another card, output "VUCI" (Croatian for "DRAW"), otherwise output "DOSTA" (Croatian for "STOP").

Sample Input and Output

Sample Input #1

6
2
3
2
3
2
3

Sample Output #1

DOSTA

Sample Input #2

1
10

Sample Output #2

VUCI

Sample Input #3

2
5
6

Sample Output #3

VUCI

Notes/Hints

Clarification of the first test case:

The sum of the already drawn cards is 15, and the difference \( X \) to 21 is 6. The number of cards in the deck with a value greater than 6 is 32 (4 Aces, 4 Kings, 4 Queens, 4 Jacks, 4 tens, 4 nines, 4 eights, and 4 sevens), whereas the number of cards in the deck with a value less than or equal to 6 is 14 (one two, one three, 4 fours, 4 fives, and 4 sixes).

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
6 2 3 2 3 2 3
样例输出
DOSTA