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年省赛


字符串匹配函数  strcmp(*a,*b)  if(true) return 0;
自信
#include<stdio.h>
#include<string.h>
int main()
{
int n,i;
char a[]="bowl",b[]="knife",c[]="fork",d[]="chopsticks";
char e[];
while(scanf("%d",&n)==)
{
for(i=;i<n;i++)
{
scanf("%s",e);
if(strcmp(a,e)==)
printf("%s ",e);
if(strcmp(b,e)==)
printf("%s ",e);
if(strcmp(c,e)==)
printf("%s ",e);
if(strcmp(d,e)==)
printf("%s ",e); }
printf("\n");
}
return ;
}

nyoj 218 Dinner(贪心专题)的更多相关文章

  1. nyoj 218 Dinner

    Dinner 时间限制:100 ms  |  内存限制:65535 KB 难度:1   描述 Little A is one member of ACM team. He had just won t ...

  2. [ACM]51nod 贪心专题

    目录 A 低买高卖 C 接水问题 D做任务一 E做任务三 51nod一个贪心专题,大多数都是见过的套路,做题找找感觉,有些题解思路懒得写了,直接贴毕姥爷的直播题解了 A 低买高卖 考虑股票市场,一共有 ...

  3. nyoj 106背包问题(贪心专题)

    背包问题 时间限制:3000 ms  |  内存限制:65535 KB 难度:3   描述 现在有很多物品(它们是可以分割的),我们知道它们每个物品的单位重量的价值v和重量w(1<=v,w< ...

  4. nyoj 448 寻找最大数(贪心专题)

    寻找最大数 时间限制:1000 ms  |  内存限制:65535 KB 难度:2   描述 请在整数 n 中删除m个数字, 使得余下的数字按原次序组成的新数最大, 比如当n=920813467185 ...

  5. nyoj 71 独木舟上的旅行(贪心专题)

    独木舟上的旅行 时间限制:3000 ms  |  内存限制:65535 KB 难度:2   描述 进行一次独木舟的旅行活动,独木舟可以在港口租到,并且之间没有区别.一条独木舟最多只能乘坐两个人,且乘客 ...

  6. nyoj 14 会场安排问题(贪心专题)java

    会场安排问题 时间限制:3000 ms  |  内存限制:65535 KB 难度:4   描述 学校的小礼堂每天都会有许多活动,有时间这些活动的计划时间会发生冲突,需要选择出一些活动进行举办.小刘的工 ...

  7. nyoj 14 会场安排问题(贪心专题)

    会场安排问题 时间限制:3000 ms  |  内存限制:65535 KB 难度:4   描述 学校的小礼堂每天都会有许多活动,有时间这些活动的计划时间会发生冲突,需要选择出一些活动进行举办.小刘的工 ...

  8. poj 1328 Radar Installation(nyoj 287 Radar):贪心

    点击打开链接 Radar Installation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 43490   Accep ...

  9. HDU3183A Magic Lamp,和NYOJ最大的数一样

    A Magic Lamp Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Tot ...

随机推荐

  1. 迅为最新推出iTOP-6818开发平台无缝支持4418开发板

    iTOP-6818开发板是一款四核ARM 八核开发板与iTOP-4418开发板完全兼容,CPU主频1.4GHz,内存1GB DDR3(2GB可选),存储16GB EMMC,板载千兆以太网,GPS,WI ...

  2. js parseInt和map函数

    今天看了一个js的题目["1","2","3"].map(parseInt),看到后脑海中浮现的答案是[1,2,3],但是看到正确答案后蒙了 ...

  3. sudo 命令情景分析

    Linux 下使用 sudo 命令,可以让普通用户也能执行一些或者全部的 root 命令.本文就对我们常用到 sudo 操作情景进行简单分析,通过一些例子来了解 sudo 命令相关的技巧. 情景一:用 ...

  4. Win10 Sql2008R2 在关闭【0x80041033】

    以前SQL Server 2008 不能登陆的时候,总是通过“计算机管理”→“SQL Server服务”更改一下,"SQL Server(MSSQLSERVER)".可是现在出现的 ...

  5. DOCKER是什么,它解决了什么问题?(转)

    Docker 虚拟机 1. docker与虚拟机性能比较 2. 如日中天的Docker解决了什么问题?

  6. IE9下css hack写法

    ie9一出css hack也该更新,以前一直没关注,今天在内部参考群mxclion分享了IE9的css hack,拿出来也分享一下: select { background-color:red\0; ...

  7. .Net配置中心-Zookeper版

    简介    zookeeper的基本概念和作用这里不做介绍,现在很多的公司都在使用它,说起它的作用,可能最先想到的是配置中心,可以将配置项作为一个node存储在zookeeper中,其他应用可以“关注 ...

  8. Binding

    Binding基础  绑定某个对象的属性值到控制上,写法如下: public class Order : INotifyPropertyChanged//只要实现此接口 { public event  ...

  9. Android四大组件之—— 使用服务进行后台操作

    什么是服务 服务是一个没有可视化界面的组件,它可以在后台长期运行并进行各种操作. 服务的创建 我们只需要继承Service类并实现相应的方法即可创建服务 要想启动服务,还得在AndroidManife ...

  10. spring 整合 mongo

    spring 非常强大,不仅在jdbc访问提供了jdbctemplate,而且在mongo访问上提供了mongoTemplate.闲话不多说,下边开始整合mongoTemplate. ONE: 添加s ...