cf452A Eevee
1 second
256 megabytes
standard input
standard output
You are solving the crossword problem K from IPSC 2014. You solved all the clues except for one: who does Eevee evolve into? You are not very into pokemons, but quick googling helped you find out, that Eevee can evolve into eight different pokemons: Vaporeon, Jolteon, Flareon, Espeon, Umbreon, Leafeon, Glaceon, and Sylveon.
You know the length of the word in the crossword, and you already know some letters. Designers of the crossword made sure that the answer is unambiguous, so you can assume that exactly one pokemon out of the 8 that Eevee evolves into fits the length and the letters given. Your task is to find it.
First line contains an integer n (6 ≤ n ≤ 8) – the length of the string.
Next line contains a string consisting of n characters, each of which is either a lower case english letter (indicating a known letter) or a dot character (indicating an empty cell in the crossword).
Print a name of the pokemon that Eevee can evolve into that matches the pattern in the input. Use lower case letters only to print the name (in particular, do not capitalize the first letter).
7
j......
jolteon
7
...feon
leafeon
7
.l.r.o.
flareon
Here's a set of names in a form you can paste into your solution:
["vaporeon", "jolteon", "flareon", "espeon", "umbreon", "leafeon", "glaceon", "sylveon"]
{"vaporeon", "jolteon", "flareon", "espeon", "umbreon", "leafeon", "glaceon", "sylveon"}
什么奇怪的东西……意思是给一个不完整的串,问是那8个串中的哪个
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<algorithm>
using namespace std;
inline int read()
{
int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
int n;
const string ch[8]={"vaporeon", "jolteon", "flareon", "espeon", "umbreon", "leafeon", "glaceon", "sylveon"};
char c[10];
int main()
{
scanf("%d",&n);
scanf("%s",c);
for (int i=0;i<8;i++)
{
bool mrk=1;
for (int j=0;j<8;j++)
if(c[j]!='.'&&c[j]!=ch[i][j])mrk=0;
if (mrk)
{
cout<<ch[i];
return 0;
}
}
}
cf452A Eevee的更多相关文章
- CF---(452)A. Eevee
A. Eevee time limit per test 1 second memory limit per test 256 megabytes input standard input outpu ...
- Codeforces 452A Eevee
#include<bits/stdc++.h> using namespace std; string m[]={"vaporeon","jolteon&qu ...
- 【Henu ACM Round#20 C】 Eevee
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 处理处所有的字符串可能的样子. 存在map里面就好. [代码] #include <bits/stdc++.h> usi ...
- MemSQL Start[c]UP 2.0 - Round 1
A. Eevee http://codeforces.com/contest/452/problem/A 字符串水题 #include<cstdio> #include<cstrin ...
- 为什么开发人员对于PHP语言褒贬不一
PHP 语言,作为服务器端开发的脚本语言,在网站开发方面非常有名.从1995年 Rasmus Lerdorf 创建之后,W3Techs 的调查显示在已知的服务端编程语言中,PHP 占了82%.其中不乏 ...
- Pencil OJ 01 开发的准备
操作系统 ubuntu-12.04.5-desktop-amd64.iso 基本应用 Node 0.12.7 MongoDB 3.0.4 Robomongo 0.8.4 Atom 参考资料 OJ hu ...
- CF 452A(Eevee-直接试)
A. Eevee time limit per test 1 second memory limit per test 256 megabytes input standard input outpu ...
- Ubuntu 16.04下为Android编译OpenCV 3.2.0 Manager
http://johnhany.net/2016/07/build-opencv-manager-for-android-on-ubuntu/ 最近想在Android上尝试一下SIFT和SURF匹配算 ...
- [TypeScript] Creating a Class in TypeScript
Typescript classes make traditional object oriented programming easier to read and write. In this le ...
随机推荐
- javascript全局对象
一.Array 二.Boolean 三.Date 四.Error 五.EvalError 六.Function 七.JSON 八.Math 九.Number 十.Object 十一.RangeErro ...
- samba(转)
配置虚拟机和主机之间的文件共享之所以配置虚拟机和主机之间的文件共享,是因为我们用惯了WINDOWS操作系统下的很多工具,比如编辑工具UltraEdit,souce insight等.我们可以在wind ...
- IOS 从Resource文件夹下Copy文件到沙盒
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.t ...
- 从决策树学习谈到贝叶斯分类算法、EM、HMM
从决策树学习谈到贝叶斯分类算法.EM.HMM (Machine Learning & Recommend Search交流新群:172114338) 引言 log ...
- MVC4 jquery 样式 主题 用法(案例)
MVC4已经自带了jquery,新建的项目,基本上什么都不用添加就可以运行,跑项目.(集成了那么多东西,jquery,modernizr,自带的默认权限,生成的模板,但是缺没有一个统一的文档或者什么去 ...
- nand烧写分析/内核在启动过程中式如何将这个文件映射成/目录及各子目录的?
我用的是ramdisk.image.gz,烧写在flash的0x10140000处 我不太明白内核在启动过程中式如何将这个文件映射成/目录及各子目录的? 如果ramdisk.image.gz在flas ...
- Unity 梯子生成算法
Unity之生成梯子算法的实现. 1.通过预制物体动态生成角度可设置的梯子形状. 1.1 主要涉及到的数学知识点,角度与弧度的转化. 弧度=角度乘以π后再除以180 角度=弧度除以π再乘以180 1. ...
- CSS学习笔记——盒模型,块级元素和行内元素的区别和特性
今天本来打算根据自己的计划进行前端自动化的学习的,无奈早上接到一个任务需求需要新增一个页面.自从因为工作需要转前端之后,自己的主要注意力几 乎都放在JavaScript上面了,对CSS和HTML这方面 ...
- AFNetworking自我总结
AFNetworking 简介 目前国内开发网络应用使用最多的第三方框架 是专为 Mac OS & iOS 设计的一套网络框架 对 NSURLConnection 和 NSURLSession ...
- GET & POST 登录
GET 登录 @property(nonatomic,assign)long long hasReceivedContentLength; - (void)getLogin { NSString * ...