2 条题解
-
0
暴力枚举
/***************************************** Note : ******************************************/ #include <queue> #include <math.h> #include <stack> #include <stdio.h> #include <iostream> #include <vector> #include <iomanip> #include <string.h> #include <algorithm> #define LL long long #define IL inline const int N = 1e6+10; const int INF = 0x3f3f3f3f; using namespace std; IL int read() { char ch = getchar(); int f = 1, num = 0; while(ch>'9'||ch<'0') { if(ch=='-') f = -1; ch=getchar(); } while(ch>='0'&&ch<='9') num = num*10+ch-'0', ch = getchar(); return num*f; } string s; char last='.'; bool check(char x) { return x=='a'||x=='e'||x=='i'||x=='o'||x=='u'||x=='y'; } int main() { read(),cin>>s; for(int i = 0;i<s.size();i++) { if(!check(s[i])||!check(last)) putchar(s[i]),last=s[i]; } }
信息
- ID
- 2313
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 4
- 标签
- 递交数
- 28
- 已通过
- 18
- 上传者