This is only for the solutions & algorithm of the problems of Codeforces. We highly recommend you to try hard yourself at first & then if you fail, you can only check the logic from our code.Don't Copy-Paste our code exactly.If you do this,your logic will not be improved/developed. So, try to realize the logic.
Stay with us
Envato Ads
Monday, August 6, 2018
Codeforces Solutions- 96A Football
Hi friends, In this post I am gonna give you the solution of the codeforces problem: 96A - Football.
The problem screenshot is given below:
Why we use o-6 ???
ReplyDeleteIt doesn't matter.you can used for(i=0;i<o;i++) in this statement.
Delete#include
ReplyDeleteint main()
{
int i,c=1;
char f[100];
gets(f);
for(i=0;i<strlen(f);i++){
if(f[i] == f[i+1]){
c++;
if(c==7){
printf("YES");
return 0;
}
}
else{c=1;}
}
printf("NO\n");
return 0;
}