B. Polycarp and Letters

网友投稿 276 2022-08-30

B. Polycarp and Letters

s

A be a set of positions in the string. Let's call it pretty

AA(i.e. there is no suchjthats[j] is an uppercase letter, anda1 

pretty

Input

n (1 ≤ n ≤ 200) — length of string s.

s

Output

pretty set of positions for string s.

Examples

input

11 aaaaBaabAbA

output

2

input

12 zACaAbbaazzC

output

3

input

3 ABC

output

0

题目大概:

求连续的小写子母中,种类最多的是多少种。

代码:

#include #include #include using namespace std;int a[150];int b[150];char q[202];int main(){ int n; scanf("%d\n",&n); for(int i=1;i<=n;i++) { scanf("%c",&q[i]); } int sum=0; int su=0; for(int i=1;i<=n;i++) { if(q[i]>='A'&&q[i]<='Z') { if(sum

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:常见的网络营销方式有哪几种?(常用的网络营销方法都有哪些?)
下一篇:HDU 4715:Difference Between Primes
相关文章

 发表评论

暂时没有评论,来抢沙发吧~