辽宁省acm竞赛赛题.docxVIP

  • 45
  • 0
  • 约1.23万字
  • 约 10页
  • 2017-02-05 发布于北京
  • 举报
辽宁省acm竞赛赛题

DinnerDescriptionLittle A is one member of ACM team. He had just won the gold in World Final. To celebrate, he decided to invite all to have one meal. As bowl, knife and other tableware is not enough in the kitchen, Little A goes to take backup tableware in warehouse. There are many boxes in warehouse, one box contains only one thing, and each box is marked by the name of things inside it. For example, if basketball is written on the box, which means the box contains only basketball. With these marks, Little A wants to find out the tableware easily. So, the problem for you is to help him, find out all the tableware from all boxes in the warehouse.InputThere are many test cases. Each case contains one line, and one integer N at the first, N indicates that there are N boxes in the warehouse. Then N strings follow, each string is one name written on the box.OutputFor each test of the input, output all the name of tableware.Sample Input3 basketball fork chopsticks2 bowl letterSample Outputfork chopsticksbowlHINT:The tableware only contains: bowl, knife, fork and chopsticks.You are my brotherDescriptionLittle A gets to know a new friend, Little B, recently. One day, they realize that they are family 500 years ago. Now, Little A wants to know whether Little B is his elder, younger or brother.InputThere are multiple test cases.For each test case, the first line has a single integer, n (n=1000). The next n lines have two integers a and b (1=a,b=2000) each, indicating b is the father of a. One person has exactly one father, of course. Little A is numbered 1 and Little B is numbered 2.Proceed to the end of file.OutputFor each test case, if Little B is Little A’s younger, print “You are my younger”. Otherwise, if Little B is Little A’s elder, print “You are my elder”. Otherwise, print “You are my brother”. The output for each test case occupied exactly one line.Sample Input51 32 43 54 65 661 32 43 54 65 76 7Sample OutputYou are my elderYou are my brotherTimeDescriptionDigital

文档评论(0)

1亿VIP精品文档

相关文档