https://i2.wp.com/eblogarithm.com/wp-content/uploads/2017/01/Codecraft17-and-Codeforces-Round-391-Div-1--Div-2-combined-problem-A-Gotta-Catch-Em-All-Solution-in-CC.png?fit=640%2C360

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 112 times, 1 visits today)



There are no comments

Add yours

Leave a Reply

%d bloggers like this: