Dinner

时间限制:100 ms  |  内存限制:65535 KB
难度:1
描述
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.

输入
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.
输出
For each test of the input, output all the name of tableware.
样例输入
3 basketball fork chopsticks
2 bowl letter
样例输出
fork chopsticks
bowl
提示
The tableware only contains: bowl, knife, fork and chopsticks.
来源
辽宁省10年省赛
上传者

ACM_李如兵


#include <string>
#include <iostream>
using namespace std;
int main()
{
string a[101];
int n,i,j;
while(cin>>n)
{
for(i=0;i<n;i++)
{
cin>>a[i];
}
for(i=0;i<n;i++)
{
if(a[i]=="bowl"||a[i]=="knife"||a[i]=="fork"||a[i]=="chopsticks")
cout<<a[i]<<" ";
}
cout<<"\n";
}
return 0;
}


最新文章

  1. The Solution of UESTC 2016 Summer Training #1 Div.2 Problem A
  2. 自定义圆饼(利用贝塞尔曲线和CGContext类完成)
  3. 转:android异步任务设计思详解(AsyncTask)
  4. Javascript跨域问题总结
  5. 前端 解决swiper js 手动滑动一下后不能自动播放
  6. web工程导入MyEclipse 就变成Java工程 ———— 解决方案
  7. c&amp; c++ enum
  8. maven搭建个人仓库
  9. nexus私服安装
  10. 【bzoj1031】[JSOI2007]字符加密Cipher
  11. 201521123114 《Java程序设计》第13周学习总结
  12. sql经典试题
  13. 【原】无脑操作:TypeScript环境搭建
  14. Centos7安装InfluxDB1.7
  15. Python&#160;一键拉取Git分支源码自动解析并执行SQL语句
  16. 简单备份mysql数据库
  17. sql 按字段指定值排序
  18. 使用T4模板调用Sqlserver链接生成自己的模板
  19. Entity Framework管理实体关系(二):管理一对二关系
  20. iOS: 删除真机测试的Provisioning Profile后,在Code Singing中出现entitlements.plist文件无效,解决办法如下:

热门文章

  1. SQL SERVER-in,between,like
  2. maven规定的目录
  3. sqlite学习笔记9:C语言中使用sqlite之插入数据
  4. Git-删除本地文件夹的repository(本地仓库)
  5. HDU 1392 凸包子
  6. vuex3
  7. 2435: [Noi2011]道路修建(树上操作)
  8. apiCloud中api.ajax方法跨域传参获取数据
  9. linux 应用软件集合
  10. URAL 1297 后缀数组+线段树