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 ...
随机推荐
- 【Xamarin挖墙脚系列:关闭 OS X El Capitan 中 SIP 安全设置功能】
比如需要修改内核配置文件: com.apple.Boot.plist 那么我们需要解锁权限. 禁止SIP模式,那么就可以修改此文件了. 在 OS X El Capitan 中有一个跟安全相关的模式叫 ...
- shell 脚本文件十六进制转化为ascii码代码
十六进制的A转化为十进制ASCII码: 1 printf "%d\n" "'A" 十六进制的A转化为十六进制ASCII码: 1 printf "%x\ ...
- Linux下(主要针对Ubuntu)下桌面分辨率的添加
系统版本: Linux (Ubuntu) 其他桌面发行版应该也行. 相关命令: lspci, cvt, xrandr 在桌面分辨率不正常显示桌面或者没有最佳的分辨率时,需要修改添加适合的桌面分辨率模式 ...
- 携程SQL面试题忘大牛解答解决思路
讨论地址:http://bbs.csdn.net/topics/380208742
- 理解最短路径——迪杰斯特拉(dijkstra)算法
原址地址:http://ibupu.link/?id=29 1. 迪杰斯特拉算法简介 迪杰斯特拉(dijkstra)算法是典型的用来解决最短路径的算法,也是很多教程中的范例,由荷兰计算机科 ...
- UESTC_The Most Wonderful Competition CDOJ 56
The Most Wonderful Competition Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB ...
- Minimum Depth of Binary Tree 解答
Question Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along ...
- [置顶] 九度笔记之 1434:今年暑假不AC
题目1434:今年暑假不AC 时间限制:1 秒 内存限制:128 兆 特殊判题:否 提交:307 解决:180 题目描述: “今年暑假不AC?”“是的.”“那你干什么呢?”“看世界杯呀,笨蛋!”“@# ...
- Change the ball(找规律)
Change the ball Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)T ...
- libaio under MIPS architecture /在mips架构下使用的libaio
First, you can find libaio source in http://libaio.sourcearchive.com/ Second,download the libaio_0.3 ...