文章目录

  • 一、 I Wanna Be the Guy
  • 总结

一、 I Wanna Be the Guy

本题链接: I Wanna Be the Guy

题目
A. I Wanna Be the Guy
time limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
There is a game called “I Wanna Be the Guy”, consisting of n levels. Little X and his friend Little Y are addicted to the game. Each of them wants to pass the whole game.

Little X can pass only p levels of the game. And Little Y can pass only q levels of the game. You are given the indices of levels Little X can pass and the indices of levels Little Y can pass. Will Little X and Little Y pass the whole game, if they cooperate each other?

Input
The first line contains a single integer n (1 ≤  n ≤ 100).

The next line contains an integer p (0 ≤ p ≤ n) at first, then follows p distinct integers a1, a2, …, ap (1 ≤ ai ≤ n). These integers denote the indices of levels Little X can pass. The next line contains the levels Little Y can pass in the same format. It’s assumed that levels are numbered from 1 to n.

Output
If they can pass all the levels, print “I become the guy.”. If it’s impossible, print “Oh, my keyboard!” (without the quotes).

Examples
input
4
3 1 2 3
2 2 4
output
I become the guy.

input
4
3 1 2 3
2 2 3
output
Oh, my keyboard!

Note
In the first sample, Little X can pass levels [1 2 3], and Little Y can pass level [2 4], so they can pass all the levels both.

In the second sample, no one can pass level 4.

本博客给出本题截图

题意:如果两个人会的所有level包括了题目中要求的所有level,那就输出I become the guy.,否则输出Oh, my keyboard!

AC代码

#include <iostream>
#include <set>using namespace std;set <int> s;int main()
{int n;cin >> n;int p;cin >> p;for (int i = 0; i < p; i ++ ){int a;cin >> a;s.insert(a);}int q;cin >> q;for (int i = 0; i < q; i ++ ){int a;cin >> a;s.insert(a);}if (s.size() == n)puts("I become the guy.");else puts("Oh, my keyboard!");return 0;
}

总结

水题,不解释

I Wanna Be the Guy相关推荐

  1. 关闭antimal_i wanna be the brown animal键位怎么操作玩法攻略

    i wanna be the brown animal键位怎么操作玩法攻略,i wanna be the brown animal硬盘版是i wanna系列的又一款经典之作了,里面的游戏boss根据神 ...

  2. HDU 5308 I Wanna Become A 24-Point Master

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5308 题面: I Wanna Become A 24-Point Master Time Limit ...

  3. 基于cocos-2dx的游戏制作——I wanna save the princess

    在进行了两周的cocos学习之后,可以开始进行游戏的创作了. I wanna主要复杂的地方在于地图的设计以及逻辑实现.下面依次进行介绍.(使用c++) 一. 瓦片地图--tile map 1. 地图整 ...

  4. Wanna Cry病毒之后,那些值得我们注意的事实和真相

    英国多家医院的电脑数据被锁死,病人排起长队,医院被迫恢复了手写单据的模式: 美国多家高校的内网被锁死,论文和学术资料无法恢复,答辩在即的学生只能重新起草论文: 中国某铁路局的门禁系统被锁死,车辆无法进 ...

  5. gonna,gotta,wanna的区别(参考牛津)

    1.原型 gonna的原型是going to gotta的原型是(have) got to wanna的原型是want to 2.意义 gonna表示"将要"的意思 gotta表示 ...

  6. 【American English】美语口语中常见的 Gonna、wanna、gotta 含义及用法

    1 [American English]美式发音,英语发音,美国音音标列表及发音 2 [American English]美语的连读规则 3 [American English]美语口语中常见的 Go ...

  7. 深度学习AI美颜系列----AI美甲算法揭秘(WANNA NAILS)

    本文将给大家分享WANNA NAILS App中漂亮的美甲效果是如何实现的,对其背后的图像算法技术做一个详解. WANNA NAILS是一款专门做美甲效果的app,效果举例如下: WANNA NAIL ...

  8. I wanna go home

    题目网址:I wanna go home 题目大意:给出n个城市 ,给出m对城市之间的距离,再给出每一个城市的所属的阵营,要求求出从城市1到城市2的最小的路径长度,城市1总是属于阵营1的,城市2是属于 ...

  9. A. I Wanna Be the Guy

    题目描述:http://codeforces.com/problemset/problem/469/A 469A. I Wanna Be the Guy time limit per test1 se ...

最新文章

  1. 黄聪:基于Linq to edmx的实体数据模型(EDM)类名批量修改工具
  2. python 程序1【登录接口】
  3. 内核地址空间和用户地址空间
  4. matlab坐标数据导出,大批量fluent导出数据,然后找对应坐标的信息
  5. 网络:窗口控制下的重发机制、流量控制
  6. opencv三维重建_使用iPhone相机和OpenCV来完成3D重建(第一部分)
  7. C#语法之Linq查询基础一
  8. 怎么判断一个字符串的最长回文子串是否在头尾_LeetCode 5 迅速判断回文串的Manacher算法...
  9. postman如何发送application/json类的post请求
  10. JUnit 4和JUnit 5区别
  11. ASTER文字识别详解
  12. sum 去重_总结leetcode上【排列问题】【组合问题】【子集问题】回溯算法去重的两种写法!...
  13. TMS320C55x的指令系统
  14. python捕获特定类型异常的保留字_python异常处理结构中用来捕获特定类型异常的保留字是_以下选项中Python用于异常处理结构中用来捕获特定类型的异常的保留字是......
  15. 通过数据,从键盘录入学生考试科目数,然后依次录入学的每一科分数.使用数组存储学生分数.然后输出总分,平均分,简单易理解
  16. 用python写的,一个中英文转摩斯电码小程序
  17. 慕课网EMOS在线办公系统源码笔记1-6章
  18. windows11彻底关闭Microsoft Defender 安装注册机
  19. 数据结构--图的创建(邻接矩阵)
  20. 详解 CatBoost 原理

热门文章

  1. 解决FastJson com.alibaba.fastjson.JSONObject cannot be cast to的问题
  2. 计算机网络原理——前三章个人总结
  3. 多节点wdcdn介绍及功能列表
  4. 自制ST-Link-V2.1
  5. Android系统的使用量全面超过Windows
  6. 自动控制原理 学习笔记3
  7. 使用 clear 属性清除浮动的原理?
  8. 计算机导论分流考试,信息学院2017级计算机类学生专业分流工作实施细则
  9. C#:将blibli缓存文件批量转换为MP4文件
  10. 基于 python 多光谱遥感数据处理、图像分类、定量评估及机器学习方法