NBUT 1217 Dinner 2010辽宁省赛
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
Output
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辽宁省赛的更多相关文章
- NBUT 1221 Intermediary 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB It is widely known that any two strangers can get to know ...
- NBUT 1220 SPY 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB The National Intelligence Council of X Nation receives a ...
- NBUT 1219 Time 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB Digital clock use 4 digits to express time, each digit ...
- NBUT 1217 Dinner
[1217] Dinner 时间限制: 1000 ms 内存限制: 32768 K 问题描写叙述 Little A is one member of ACM team. He had just won ...
- 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 ...
- NBUT 1222 English Game 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB This English game is a simple English words connection gam ...
- 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 ...
- 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 ...
- NBUT 1223 Friends number 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB Paula and Tai are couple. There are many stories betwee ...
随机推荐
- python enumerate用法总结--转载
enumerate()说明 enumerate()是python的内置函数 enumerate在字典上是枚举.列举的意思 对于一个可迭代的(iterable)/可遍历的对象(如列表.字符串),enum ...
- xss脚本注入后端的防护
1.脚本注入最主要的是不要相信用户输入的任何数据,对数据进行转义 可以使用:org.springframework.web.util.HtmlUtils包中的 HtmlUtils.htmlEscape ...
- Struts2文件上传的大小限制问题
问题:上传大文件报错…… 解决:修改struts.xml文件中的参数如下 <constant name="struts.multipart.maxSize" value= ...
- 小行星碰撞 Asteroid Collision
2018-08-07 11:12:01 问题描述: 问题求解: 使用一个链表模拟栈,最后的状态一定是左侧全部是负值,表示的是向左飞行,右侧的全部是正值,表示的是向右飞行. 遍历整个数组,对于每个读到的 ...
- C++STL2--map
C++STL2--map 一.心得 本质上就是数组,关联数组,map就是键到值得一个映射,并且重载了[]符号,所以可以像数组一样用. map<string,int> cnt;//前键后值, ...
- HDU-4849 Wow! Such City! (单源最短路)
Problem Description Doge, tired of being a popular image on internet, is considering moving to anoth ...
- UVA-10318 Security Panel (DFS+剪枝)
题目大意:求将一个r*c的按钮矩阵由全部为关变成全部为开的最少按扭次数,每按一次开关能作用到的范围不定. 题目分析:开关问题.打眼一看就是BFS+位压缩,但是写出来之后TLE.用DFS不断更新最优解. ...
- 如何迭代pandas dataframe的行
from:https://blog.csdn.net/tanzuozhev/article/details/76713387 How to iterate over rows in a DataFra ...
- 程序中使用7z.exe解压不完整的问题
今天在代码中使用7x.exe解压一个tar压缩包,完成之后,发现关键性的文件不存在, 再细看发现,很多文件都没解压出来. 经研究,发现是这个压缩包中,有2个文件解压位置一样, 7z.exe在中途弹出提 ...
- Unicode与UTF-8,UTF-16
Unicode(UTF-8, UTF-16)令人混淆的概念 为啥需要Unicode 我们知道计算机其实挺笨的,它只认识0101这样的字符串,当然了我们看这样的01串时肯定会比较头晕的,所以很多时候为了 ...