MemSQL Start[c]UP 2.0 - Round 1A(构造)
2015-01-26 00:33
260 查看
题目链接:http://codeforces.com/problemset/problem/452/A
解题思路:
打个表暴力查找匹配。
完整代码:
解题思路:
打个表暴力查找匹配。
完整代码:
#include <algorithm> #include <iostream> #include <cstring> #include <complex> #include <cstdio> #include <string> #include <cmath> using namespace std; typedef long long LL; const int MOD = int(1e9)+7; const int INF = 0x3f3f3f3f; const double EPS = 1e-9; const double PI = acos(-1.0); //M_PI; string s[8] = {"vaporeon", "jolteon", "flareon", "espeon", "umbreon", "leafeon", "glaceon", "sylveon"}; string t , a; int main() { #ifdef DoubleQ freopen("in.txt","r",stdin); #endif std::ios::sync_with_stdio(false); std::cin.tie(0); int n; while(cin >> n) { cin >> a; for(int i = 0 ; i < 8 ; i ++) { if(n == s[i].length()) { int flag = 0; for(int j = 0 ; j < n ; j ++) { if(a[j] != '.' && a[j] != s[i][j]) { flag = 1; break; } } if(flag == 1) continue; else { cout << s[i] << endl; break; } } } } }
相关文章推荐
- MemSQL Start[c]UP 2.0 - Round 1 D. Washer, Dryer, FoldercO
- MemSQL Start[c]UP 2.0 - Round 2 - Online Round
- [Hash] Codeforces 452F MemSQL Start[c]UP 2.0 - Round 1 F. Permutation
- MemSQL Start[c]UP 2.0 - Round 1
- MemSQL Start[c]UP 2.0 - Round 2 - Online Round(数学:高精度)
- MemSQL Start[c]UP 2.0 - Round 2 - Online Round 题解
- MemSQL Start[c]UP 2.0 - Round 1 .A
- MemSQL Start[c]UP 2.0 - Round 2 A
- MemSQL Start[c]UP 2.0 - Round 2 - Online Round A,B,C
- MemSQL Start[c]UP 2.0 - Round 1
- codeforces MemSQL Start[c]UP 2.0 - Round 1 A. Eevee
- codeforces MemSQL Start[c]UP 2.0 - Round 1 B. 4-point polyline
- MemSQL Start[c]UP 2.0 - Round 1
- MemSQL Start[c]UP 2.0 - Round 1 B. 4-point polyline (线段的 枚举)
- MemSQL Start[c]UP 2.0 - Round 1(无聊练手B题)
- Codeforces Round #437 (Div. 2, based on MemSQL Start[c]UP 3.0 - Round 2) 总结
- Codeforces Round #437 (Div. 2, based on MemSQL Start[c]UP 3.0 - Round 2) A.Between the Offices
- Codeforces Round #437 (Div. 2, based on MemSQL Start[c]UP 3.0 - Round 2) 题解
- CF memsql Start[c]UP 2.0 B
- MemSQL Start[c]UP 3.0 - Round 1 E. Desk Disorder