• [1302] Happy Or Sad

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • This time Death-Moon do not told a profound story, but told a love story. Long time ago there were two lovers A and B in different place, and it was not convenient to see each other, so they frequently sent messages to each other. One sent ten messages a time, then received some feedbacks, if half or more feedbacks received, one would felt happy because message sent successfully, but if received less feedbacks, one would felt sad.


  • 输入
  • First there is a integer N(2<= N <= 300), means the number of contacts, them N lines followed. the ith line include who the number of feedbacks,and the number of unsuccessful messages.
  • 输出
  • For each case, output A's feeling and B's feeling in two single line.
  • 样例输入
  • 2
    A 5 5
    B 6 4
    3
    A 0 10
    B 0 10
    A 10 0
  • 样例输出
  • Happy
    Happy
    Happy
    Sad
  • 提示
  • 来源
  • Mr. Cai
  • 操作

显示春菜