CodeForces - 469A I Wanna Be the Guy
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 a 1, a 2, ..., a p (1 ≤ a i ≤ 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.
分析
1 - n 如果全部出现了则输出 I become the guy.
不然输出 Oh, my keyboard!
#include<bits/stdc++.h>
using namespace std;
int n, _size, input; set<int>ans;
int main() {
cin >> n; for (int i = 2; i--;)for (cin >> _size; _size--;)cin >> input, ans.insert(input);
cout << (n == ans.size() ? "I become the guy.\n" : "Oh, my keyboard!\n");
}
CodeForces - 469A I Wanna Be the Guy的更多相关文章
- Codeforces I Wanna Be the Guy 题解
这道题非常简单,有两种做法: 1. 用一个数组标记是不是每个关卡小X或小Y都可以通过 2. 用set储存小X和小Y能够通过的关卡(set有去重功能),最后判断set的长度是否等于n 因为楼上已经有第一 ...
- Codeforces Round #467 (Div. 2) B. Vile Grasshoppers
2018-03-03 http://codeforces.com/problemset/problem/937/B B. Vile Grasshoppers time limit per test 1 ...
- python爬虫学习(5) —— 扒一下codeforces题面
上一次我们拿学校的URP做了个小小的demo.... 其实我们还可以把每个学生的证件照爬下来做成一个证件照校花校草评比 另外也可以写一个物理实验自动选课... 但是出于多种原因,,还是绕开这些敏感话题 ...
- 【Codeforces 738D】Sea Battle(贪心)
http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n g ...
- 【Codeforces 738C】Road to Cinema
http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants ...
- 【Codeforces 738A】Interview with Oleg
http://codeforces.com/contest/738/problem/A Polycarp has interviewed Oleg and has written the interv ...
- CodeForces - 662A Gambling Nim
http://codeforces.com/problemset/problem/662/A 题目大意: 给定n(n <= 500000)张卡片,每张卡片的两个面都写有数字,每个面都有0.5的概 ...
- CodeForces - 274B Zero Tree
http://codeforces.com/problemset/problem/274/B 题目大意: 给定你一颗树,每个点上有权值. 现在你每次取出这颗树的一颗子树(即点集和边集均是原图的子集的连 ...
- CodeForces - 261B Maxim and Restaurant
http://codeforces.com/problemset/problem/261/B 题目大意:给定n个数a1-an(n<=50,ai<=50),随机打乱后,记Si=a1+a2+a ...
- CodeForces - 696B Puzzles
http://codeforces.com/problemset/problem/696/B 题目大意: 这是一颗有n个点的树,你从根开始游走,每当你第一次到达一个点时,把这个点的权记为(你已经到过不 ...
随机推荐
- 一个NET8 AOT编译的辅助项目,让你的任何可执行应用快速部署为服务
不知道大家有没有和小编一样,很多时候想将自己的一些应用转为服务运行,比如一些控制台应用或者.NET Core应用,但是又不想重新编码,把他们转为服务,本文将给大家提供些我使用过的方法,并提供一个基于N ...
- 报错:bs4.FeatureNotFound: Couldn't find a tree builder with the features you requ
安装 pip3 install lxml 即可
- localhost工具:本地代码的远程之路
在日常的开发过程中,本地代码远程调试一直是最理想的开发状态.本文通过介绍京东集团内开发的一个轻量简单的小工具"localhost",从多角度的方案思考,到原理介绍,到最终的方案落地 ...
- 网安靶场环境_DVWA-读取文件报错File not found! Cookie中有两个security键
DVWA-文件包含漏洞-读取文件报错-ERROR: File not found! Cookie中有两个security键 1 问题复现 (1)登录DVMA后,设置DVWA Security为Low. ...
- 企业应用开发中.NET EF常用哪种模式?
前言 本篇文章来源于微信技术群小伙伴的提问,在企业应用开发中.NET ORM EF常用哪种模式进行开发?今天我们一起来了解一下EF开发的三种模式. EF/EF Core介绍 Entity Framew ...
- LeetCode224:基本计算器(栈)
解题思路: 1.双栈模拟,一个用来存数,一个用来存操作符.需要考虑 '('后面紧跟'+'.'-'这种情况 2.递归:遇到左括号开始递归,遇到右括号结束递归,返回值. 1 class Solution: ...
- 华企盾DSC客户端右键菜单不显示常见处理方法
1.检查控制台"客户端不显示右键菜单项" 2.未分发模块权限,若以分配可尝试去掉重新分配模块 3.检查杀毒软件是否杀掉了5097目录的文件(覆盖安装,以上两条没问题,这条比较常见) ...
- 面向对象(OOP)
面向对象 面向对象 面向过程 & 面向对象 面向过程思想 步骤清晰简单,第一步做什么,第二步做什么... 面对过程适合处理一些较为简单问题 面向对象思想 物以类聚,分类的思维模式,思考问题首先 ...
- 真的最后一次了——城院GO导航大作业迭代最终版
真的!!!最后一次了!不骗人! 1.小程序的体验版二维码: 想体验的可以申请一下体验权限: 2.小程序目前功能介绍 1.首先进入是index页面:点击第一个是学校简介页面,第二个能直接跳到主程序的地图 ...
- Napping - vulnhub - writeup
Napping - vulnhub - writeup 信息收集 目标开放了22和80. root@kali ~ » arp-scan -I eth1 -l Interface: eth1, type ...