Time limit  1000 ms

Memory limit  32768 kB

Little 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.

Input

There 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.

Output

For each test of the input, output all the name of tableware.

Sample Input

3 basketball fork chopsticks
2 bowl letter

Sample Output

fork chopsticks
bowl

Hint

The tableware only contains: bowl, knife, fork and chopsticks.

签到题
 #include<cstdio>
#include<iostream>
#include<string>
#include<cstring>
#include<algorithm>
using namespace std; int main()
{
int n;
char a[];
bool flag;
while(~scanf("%d",&n))
{
flag=false;
while(n--)
{
cin>>a;
if(strcmp(a,"bowl")==||strcmp(a,"knife")==||strcmp(a,"fork")==||strcmp(a,"chopsticks")==)
{
if(flag)
printf(" ");
cout<<a;
flag=true;
}
}
cout<<endl;
}
return ;
}

NBUT 1217 Dinner 2010辽宁省赛的更多相关文章

  1. NBUT 1221 Intermediary 2010辽宁省赛

    Time limit 1000 ms Memory limit 131072 kB It is widely known that any two strangers can get to know ...

  2. NBUT 1220 SPY 2010辽宁省赛

    Time limit  1000 ms Memory limit  131072 kB The National Intelligence Council of X Nation receives a ...

  3. NBUT 1219 Time 2010辽宁省赛

    Time limit   1000 ms Memory limit   131072 kB Digital clock use 4 digits to express time, each digit ...

  4. NBUT 1217 Dinner

    [1217] Dinner 时间限制: 1000 ms 内存限制: 32768 K 问题描写叙述 Little A is one member of ACM team. He had just won ...

  5. NBUT 1224 Happiness Hotel 2010辽宁省赛

    Time limit 1000 ms Memory limit 131072 kB The life of Little A is good, and, he managed to get enoug ...

  6. NBUT 1222 English Game 2010辽宁省赛

    Time limit 1000 ms Memory limit 131072 kB This English game is a simple English words connection gam ...

  7. NBUT 1225 NEW RDSP MODE I 2010辽宁省赛

    Time limit  1000 ms Memory limit  131072 kB Little A has became fascinated with the game Dota recent ...

  8. NBUT 1218 You are my brother 2010辽宁省赛

    Time limit 1000 ms Memory limit 131072 kB Little A gets to know a new friend, Little B, recently. On ...

  9. NBUT 1223 Friends number 2010辽宁省赛

    Time limit  1000 ms Memory limit   131072 kB Paula and Tai are couple. There are many stories betwee ...

随机推荐

  1. mysql 存储过程简单实例

    一.什么是存储过程 存储过程(Stored Procedure)是在大型数据库系统中,一组为了完成特定功能的SQL 语句集,存储在数据库中,经过第一次编译后再次调用不需要再次编译,用户通过指定存储过程 ...

  2. Java东西太多,记录一些知识点

    实习两个月了,这两个月接触了不少东西,简单列举一下知识,未来需要多多学习和了解. 1.前端js.extjs4.Jquery(js框架这些基本现学现用): 2.基础不好要补补Servlet和JSP(再往 ...

  3. Java中如何实现类似C++结构体的二级排序

    1:实现Comparable接口 import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; ...

  4. hdu 1573 X问题 两两可能不互质的中国剩余定理

    X问题 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Desc ...

  5. UI自动化测试篇 :webdriver+ant+jenkins自动化测试实践

    http://www.cnblogs.com/chengtch/p/6063360.html 前面基本弄清楚了webdriver+ testng 的测试环境部署,现在这里记录一下结合ant及jenki ...

  6. Python day4_list的常见方法1_笔记(浅拷贝和深拷贝的简述)

    li=[1,2,3,'55dd'] li.clear()#清除列表内容 print(li) li.append(1)#追加 li.append(3) print(li) #拓展:直接赋值和copy和d ...

  7. 雷林鹏分享:C# 多态性

    C# 多态性 多态性意味着有多重形式.在面向对象编程范式中,多态性往往表现为"一个接口,多个功能". 多态性可以是静态的或动态的.在静态多态性中,函数的响应是在编译时发生的.在动态 ...

  8. English trip -- Phonics 3 元音字母e

    xu言: 额...今天给我上自然拼读的maple老师 - . -和上次给我上第二集自然拼读的是同一个老师.突然考了考我上次学的内容~感觉大脑一片空白.看来review不能光说而不下苦功夫啊... 元音 ...

  9. android--------微信 Tinker 热修复 (三)

    前面简单介绍了一下Tinker热修复的使用,包含debug和release,今天就来分享一下微信针对Tinker热修复提供的一个平台,TinkerPatch补丁管理后台. 1:什么是TinkerPat ...

  10. Android设计模式之单例模式

    定义 单例模式是一种常用的软件设计模式.在它的核心结构中只包含一个被称为单例的特殊类.通过单例模式可以保证系统中一个类只有一个实例 . 单例模式是设计模式中最简单的形式之一.这一模式的目的是使得类的一 ...