Tag: problem: (B) Polycarp and Letters Solve In C/C++

Codeforces Round #436 (Div. 2), problem: (B) Polycarp and Letters Solution In C/C++

#include <stdio.h> int c; void reset(){ for(int i=0;i<26;i++){ c=0; } } int main(){ int n,i,cur=0,max=0; scanf(“%d”,&n); char a; scanf(“%s”,a); reset(); for(i=0;i<n;i++){ if(a>=’A’ && a<=’Z’){ cur=0; reset(); } else if(c-‘a’]==0){ c-‘a’]++; cur++; } if(cur>max){ max=cur; } } printf(“%dn”,max); return 0; } 📦 Looking for Codeforces Round 436...

Want to stay up to date with the latest news?

We would love to hear from you! Please fill in your details and we will stay in touch. It's that simple!