ural 1098. Questions

ural 1098. Questions

#include < iostream >
#include
< string >
using   namespace  std;


#define  N 1999
int  len;
char  s[ 30001 ];
int  main()
{
    
// freopen("1098.in","r",stdin);
    
// freopen("1098.out","w",stdout);
    len = 0 ;
    
while (scanf( " %c " , & s[ 0 ]) != EOF){
        
if (s[ 0 ] >= '   ' )
            s[
++ len] = s[ 0 ];
    }
    
int  k = 1 ;
    
for ( int  i = 2 ;i <= len; ++ i){
        k
= (k + N) % i;
        
if ( ! k) k = i;
    }
    
if (s[k] == ' ? ' )
        printf(
" Yes\n " );
    
else   if (s[k] == '   ' )
        printf(
" No\n " );
    
else  printf( " No comments\n " );
    
return   0 ;
}



你可能感兴趣的:(ural 1098. Questions)