Codeforces 733A Grasshopper And the String
来源:互联网 发布:天津港火灾知乎 编辑:程序博客网 时间:2024/05/16 07:20
题意:一只青蛙从左到右每次只能跳到最近的AIEOUY这几个字母上,从字串的左边调到右边,问它做大需要一次跳几格。
#include<bits/stdc++.h>using namespace std;#define mod 1000000007#define PI acos(-1.0)#define INF 0x3f3f3f3ftypedef long long LL;typedef unsigned long long ULL;char s[110];int ok(char c){ if(c=='A'||c=='E'||c=='I'||c=='O'||c=='U'||c=='Y')return 1; return 0;}int main(){ scanf("%s",s); int len=strlen(s); int mx=0; int t=1; for(int i=0;i<len;i++){ if(ok(s[i])){ mx=max(mx,t); t=1; } else{ t++; } } mx=max(t,mx); printf("%d\n",mx); return 0;}
0 0
- Codeforces 733A Grasshopper And the String
- codeforces--733A. Grasshopper And the String
- CodeForces 733A - Grasshopper And the String
- Codeforces 733A Grasshopper And the String
- 【非常高%】【codeforces 733A】Grasshopper And the String
- 733A Grasshopper And the String codeforces(水题)
- CodeForces 733A Grasshopper And the String(水题)
- CodeForces 733 A.Grasshopper And the String(水~)
- 733A Grasshopper And the String
- A. Grasshopper And the String
- A. Grasshopper And the String
- Codeforces Round #378 (Div. 2)A. Grasshopper And the String
- Codeforces Round #378 (Div. 2) A. Grasshopper And the String
- codeforces#378 Div.2 A. Grasshopper And the String
- [codeforces] A. Grasshopper And the String 简单模拟
- codeforces 733A 733B之Grasshopper And the String Parade
- CodeForces 733A Grasshopper And the String(蚂蚱跳字符)
- 【codeforces】Grasshopper And the String(div2A)
- linux下日志脚本
- 关于spring事物的隔离级别和事物的传播行为
- Nova RPC服务 之 Nova RPC服务的创建
- NOIP提高组2011 观光公交
- web数据无法存入数据库,spring扫描路径错误
- Codeforces 733A Grasshopper And the String
- oracle job 定时执行存储过程
- JavaScript中的innerHTML属性的使用
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- JAVA主线程等待所有子线程执行完成后主线程再执行
- 最少购物费用问题
- Codeforces 733B Parade
- Linux下NFS服务器
- keepalived高可用