Dinner

Description

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 <iostream>
using namespace std;
int main()
{
    int n;
    while(cin>>n)
    {
        string str;
        int flag=0;
        while(n--)
        {
            cin>>str;
            if(str== "bowl" || str == "knife" ||str == "fork" || str == "chopsticks")
            {
                flag++;
                if(flag==1)
                cout<<str;
                else
                cout<<" "<<str;
            }
        }
        cout<<endl;
    }
    return 0;
}


### 关于 CSS Dinner Tutorial 或 Resources 的详细介绍 对于初学者来说,学习 CSS 可能会感到有些复杂,因此找到合适的教程和资源非常重要。以下是几个推荐的学习路径以及一些实用技巧: #### 推荐的 CSS 学习资源 1. **CSS Dinner Tutorial 官方网站** 如果提到 “Dinner Tutorial”,可能是指类似于 Codecademy 或 FreeCodeCamp 提供的互动课程。虽然没有名为“CSS Dinner”的具体项目,但可以尝试访问类似的平台来获取交互式的练习环境[^3]。 2. **MDN Web Docs** Mozilla 开发者网络提供了详尽的文档和支持材料,适合希望深入理解 CSS 属性及其功能的人群。它涵盖了从基础到高级的各种主题,并附带大量实例说明如何应用这些技术[^4]。 3. **FreeCodeCamp** 这是一个免费在线教育平台,在这里可以通过完成一系列挑战逐步掌握前端开发技能,其中包括全面覆盖HTML/CSS的基础教学部分[^5]。 4. **Codrops Blog** Codrops 是一个专注于网页设计和技术的文章博客站点,经常发布关于新奇视觉效果实现方法的文章,非常适合那些想要探索更创意表达方式的学生们阅读参考[^6]。 #### 实践建议 为了有效巩固所学知识并避免仅仅停留在理论层面而不去动手实践的情况发生,请务必遵循以下原则: - 尝试构建个人项目以运用课堂上学过的概念; - 利用 GitHub Pages 部署自己的作品集页面展示成果; - 加入社区讨论组分享经验并与他人交流心得体验; ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>CSS Practice</title> <!-- Linking an external stylesheet --> <link rel="stylesheet" href="styles.css"> </head> <body> <h1>Welcome to My Website!</h1> <p>This paragraph will have custom styling applied via CSS.</p> <!-- Adding a button styled using inline styles as demonstration only--> <button style="background-color: blue; color:white;">Click Me</button> </body> </html> ``` 以上代码片段展示了基本 HTML 文件结构及简单样式的引入方法。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值