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. shell 截取字符串

    vvar='{"floor":2,"hotelid":"3433bbb"}' #vvar='{"hotelid":&qu ...

  2. VcCallC#_02

    1.VC代码:(vs2013运行正常) // ConsoleApplication_CallCS.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h&quo ...

  3. Android JNI(一)——NDK与JNI基础

    本系列文章如下: Android JNI(一)——NDK与JNI基础 Android JNI学习(二)——实战JNI之“hello world” Android JNI学习(三)——Java与Nati ...

  4. 从996到ICU——我们终将被自我厌恶

    自从996.icu在github上收获了18万点赞以来,超时工作,超负荷劳动似乎成了天下所有“无产阶级者”的共同点.对于这样的剥削制度,我想再多的批评和抨击都不为过.但是今天我想说3个小故事,只为引起 ...

  5. 解决dos窗口乱码问题

    大家有没有遇到这样的情况,看着就糟心 打开dos窗口, 输入命令 chcp 936 (936表示中文编码GBK, 也可以设置其他编码), 回车一下执行.  鼠标右键 -> 属性  (关键一步): ...

  6. union和union all比较说明

    执行sql语句:select '1' union select '3' union select '2'  union select '1' 得到的结果集如下: 执行sql语句如下: select ' ...

  7. springboot 解决 The bean 'userRepository', defined in null, could not be registered. A bean with that name has already been defined in file XXX and overriding is disabled.

    1.springboot 启动时报错: 2019-02-20 14:59:58.226 INFO 10092 --- [ main] c.f.s.SpringbootssmApplication : ...

  8. consensus sequence

    consensus sequence:称为一致序列.一些遗传元件(如启动子)中反复出现且很少有改变的DNA序列.不同种生物编码同一种蛋白质的基因也会有共有序列.通过序列比较发现相似但不一定完全相同的核 ...

  9. LeetCode--122--卖卖股票的最佳时机II

    问题描述: 给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格. 设计一个算法来计算你所能获取的最大利润.你可以尽可能地完成更多的交易(多次买卖一支股票). 注意:你不能同时参与多笔交易( ...

  10. PHP函数总结 (六)

    <?php /** * 递归函数(自调用函数): * 在函数体内直接或间接的自己调用自己 * 通常有一个条件判断是否需要执行递归,并且在特定条件下终止函数的递归调用动作,把目前流程的主控制权交回 ...