Codecraft-17 and Codeforces Round #391 (Div. 1 + Div. 2, combined), problem: (A) Gotta Catch Em’ All! Solution in C/C++

#include<stdio.h>
#include<string.h>
int main(){
int i,j;
char ch;
char a[100005];
int b[256]={0};
while((ch=getchar())!=EOF){
b[ch]++;
}
char *d=”ulbasr”;
int min=b[‘B’];
b[‘u’]=b[‘u’]/2;
b[‘a’]=b[‘a’]/2;
for(i=0;i<strlen(d);i++){
if(min>b[d[i]]){
min=b[d[i]];
}
}
printf(“%d”,min);
}

(Visited 136 times, 1 visits today)

About the Author:

Leave A Comment