测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A1079. [COCI-2006_2007-contest4]#4 SIBICE

编程题 普及+/提高

题目描述

Young Mirko threw matches all over the floor of his room.
His mom did not like that and ordered him to put all the matches in a box. Mirko soon noticed that not all of the matches on the floor fit in the box, so he decided to take the matches that don't fit and throw them in the neighbour's garbage, where his mom (hopefully) won't find them.
Help Mirko determine which of the matches fit in the box his mom gave him. A match fits in the box if its entire length can lie on the bottom of the box. Mirko examines the matches one by one.

输入格式

The first line of input contains an integer N (1 ≤ N ≤ 50), the number of matches on the floor, and two integers W and H, the dimensions of the box (1 ≤ W ≤ 100, 1 ≤ H ≤ 100).
Each of the following N lines contains a single integer between 1 and 1000 (inclusive), the length of one match.

输出格式

For each match, in the order they were given in the input, output on a separate line "DA" if the match fits in the box or "NE" if it does not.

输入输出样例

输入 #1
5 3 4 
3 
4 
5 
6 
7 
输出 #1
DA 
DA 
DA 
NE 
NE 
输入 #2
2 12 17 
21 
20 
输出 #2
NE 
DA
上一题 去做题 下一题