CF 452A(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"}
水题,直接试
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<functional>
#include<iostream>
#include<cmath>
#include<cctype>
#include<ctime>
using namespace std;
#define For(i,n) for(int i=1;i<=n;i++)
#define Fork(i,k,n) for(int i=k;i<=n;i++)
#define Rep(i,n) for(int i=0;i<n;i++)
#define ForD(i,n) for(int i=n;i;i--)
#define RepD(i,n) for(int i=n;i>=0;i--)
#define Forp(x) for(int p=pre[x];p;p=next[p])
#define Lson (x<<1)
#define Rson ((x<<1)+1)
#define MEM(a) memset(a,0,sizeof(a));
#define MEMI(a) memset(a,127,sizeof(a));
#define MEMi(a) memset(a,128,sizeof(a));
#define INF (2139062143)
#define F (100000007)
#define MAXN (8+10)
long long mul(long long a,long long b){return (a*b)%F;}
long long add(long long a,long long b){return (a+b)%F;}
long long sub(long long a,long long b){return (a-b+(a-b)/F*F+F)%F;}
typedef long long ll;
char s[9][100]={"vaporeon", "jolteon", "flareon", "espeon", "umbreon", "leafeon", "glaceon", "sylveon"},st[MAXN];
int n;
int main()
{
// freopen("Eevee.in","r",stdin);
// freopen("Eevee.out","w",stdout);
scanf("%d",&n);
scanf("%s",st);
Rep(i,8)
if (strlen(s[i])==n)
{
bool b=0;
Rep(j,n)
{
if (st[j]!='.'&&st[j]!=s[i][j]) {b=1;break;}
}
if (b) continue;
printf("%s\n",s[i]);
} return 0;
}
CF 452A(Eevee-直接试)的更多相关文章
- Codeforces 452A Eevee
#include<bits/stdc++.h> using namespace std; string m[]={"vaporeon","jolteon&qu ...
- Appium-001-测试开发环境搭建(Android - Win7)
随着移动端 App 测试自动化的兴起,为更好的控制产品质量,越来越多的中大型公司开始了移动端的自动化测试.Appium 自动化测试技术也是我很早之前就想学习的一门技术,却一直没有比较空余的时间来学习( ...
- 关于小改CF协同过滤至MapReducer上的一些心得
至上次重写ID3 MR版之后,手贱继续尝试CF.之前耳闻CF这两年内非常火,论内某大神也给了单机版(90%代码来自于其).所以想试试能否改到MR上.整体来说,CF本身的机制以相似性为核心,与迭代调用几 ...
- 【codeforces】【比赛题解】#915 Educational CF Round 36
虽然最近打了很多场CF,也涨了很多分,但是好久没写CF的题解了. 前几次刚刚紫名的CF,太伤感情了,一下子就掉下来了,不懂你们Div.1. 珂学的那场我只做了第一题……悲伤. 这次的Education ...
- 【codeforces】【比赛题解】#849 CF Round #431 (Div.2)
cf的比赛越来越有难度了……至少我做起来是这样. 先看看题目吧:点我. 这次比赛是北京时间21:35开始的,算是比较良心. [A]奇数与结束 "奇数从哪里开始,又在哪里结束?梦想从何处起航, ...
- 学习使用Jmeter做压力測试(一)--压力測试基本概念
一.性能測试的概念 性能測试是通过自己主动化的測试工具模拟多种正常峰值及异常负载条件来对系统的各项性能指标进行測试.负载測试和压力測试都属于性能測试,两者能够结合进行. 通过负载測试, ...
- 【机器学习算法-python实现】协同过滤(cf)的三种方法实现
(转载请注明出处:http://blog.csdn.net/buptgshengod) 1.背景 协同过滤(collaborative filtering)是推荐系统经常使用的一种方法.c ...
- 关于新世界的大门(新博客地址:BBBob.cf)
更新:BBBob.cf 这个域名已经不用了(但是依旧可以访问),永久域名改为了BBBob.win 新博客地址为BBBob.cf,以后的博客都会在新博客更新,当然在新博客上我也会写得更用心些,不再像这里 ...
- 局域网网络性能測试方法HDtune 64K有缓存測速法,让你得知你的网络性能
该方法能够有效測试出您的网络传输性能究竟有多高,该方法通用于有盘,无盘(系统虚拟盘) ,游戏虚拟盘,以及其它带有缓存功能的虚拟盘软件,可是由于每款软件的工作方式和原理都不仅同样,所以每款软件的測试结果 ...
随机推荐
- MySQLdb的安装与使用
一.安装 安装已编译版本号(此方法简便快捷): http://www.codegood.com/downloads 依据自己系统下载,双击安装,搞定 然后import MySQLdb.查看是否成功 我 ...
- vc 基于对话框多线程编程实例——线程之间的通信
vc基于对话框多线程编程实例——线程之间的通信 实例:
- 端口映射工具 redir/socat/xinetd - 运维技术 - 开源中国社区
端口映射工具 redir/socat/xinetd - 运维技术 - 开源中国社区 端口映射工具 redir/socat/xinetd 10人收藏此文章, 我要收藏 发表于3天前(2013-08 ...
- docs/pcs/rest/file data apis list - 百度开发者中心
docs/pcs/rest/file data apis list - 百度开发者中心 更新通知: 2013.6.20 上传.下载新域名正式上线使用,相关接口“上传单个文件”.“分片上传-文件分片上传 ...
- 警惕!iPhone 6即将上市 诈骗邮件已现身网络
随着iPhone 6即将上市,各路小道消息已经開始满天飞.就在近几日,一些记者还收到了假的iPhone 6将要上市的通知邮件.趋势科技也收到了几封,下面是样本之中的一个: (垃圾邮件样本) 不清楚iP ...
- zoj3747(递推dp)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5170 题意:给n个士兵排队,每个士兵三种G.R.P可选,求至少有m个 ...
- 安装 MYSQL exec: g++: not found 报错
解决办法: yum install -y gcc-c++
- 提供一个好用的Oracle Database 11g 下载地址
提供一个好用的Oracle Database 11g 下载地址,在windows xp 操作系统下,测试通过. http://download.oracle.com/otn/nt/oracle11g/ ...
- Failed to load libGL.so问题解决
Ubuntu 14.04下启动模拟设备Android 4.2.2的时候报错: failed to load libgl.so 先用locate 命令定位libGL库, 然后加入�一个链接就可以: de ...
- ThreadPoolExecutor的应用和实现分析(中)—— 任务处理相关源码分析 线程利用(转)
前面一篇文章从Executors中的工厂方法入手,已经对ThreadPoolExecutor的构造和使用做了一些整理.而这篇文章,我们将接着前面的介绍,从源码实现上对ThreadPoolExecuto ...