topcode SRM 577 DIV2 EllysNewNickname
2013-04-28 19:00
405 查看
#include <iostream> #include <vector> #include <string> using namespace std; const string vowels = "aeiouy"; bool isVowels(char ch){ for(int i = 0; i < vowels.length(); i ++ ) if( vowels[i] == ch) return true; return false; } class EllysNewNickname{ public: int getLength(string nickname){ int cnt = 1; for(int i = 1; i < nickname.length(); i ++ ){ if( isVowels(nickname[i]) && isVowels(nickname[i-1]) ) continue; cnt++; } return cnt; } };
相关文章推荐
- topcode SRM 577 DIV1 EllysRoomAssignmentsDiv1
- topcode SRM 577 DIV2 EllysCoprimesDiv2
- EllysThreeRivers(SRM543-div2-3)
- Codeforces Round #150 (Div. 2) C. The Brand New Function
- topcoder srm 518 div 2
- Topcoder SRM 543 DIV2 1000 EllysThreeRivers & DIV1 500 EllysRivers
- Codeforces Round #346 (Div. 2) E. New Reform
- Codeforces Round #234 (Div. 2) B. Inna and New Matrix of Candies
- topcoder srm 519 div 1
- TopCoder SRM 659 Div2 Problem 500 - PublicTransit (思维)
- Topcoder SRM 573 WolfPackDivTwo
- topcoder SRM div 2 level 1
- SRM 577 Div II Level Two: EllysRoomAssignmentsDiv2
- Codeforces Round #346 (Div. 2)E. New Reform 乱搞dfs
- Topcoder SRM 688 div2
- topcoder SRM495 div1 level3
- Topcoder SRM 656 DIV2 1000 题解(动态规划)
- SRM 577 Div II Level Two: EllysRoomAssignmentsDiv2
- Topcode SRM 556
- Codeforces Round #346 (Div. 2) E. New Reform