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, 0 , 0 , 0 , F, 0 , F,
F, 0 , F, 0 , 0 , 0 , F, 0 ,
0 , F, 0 , F, 0 , 0 , 0 , F,
F, 0 , F, 0 , F, 0 , 0 , 0 ,
0 , F, 0 , F, 0 , F, 0 , 0 ,
F, 0 , F, 0 , F, 0 , F, 0 ,
0 , F, 0 , F, 0 , F, 0 , F,
0 , 0 , F, 0 , F, 0 , F, 0 ,
1 , 0 , 0 , F, 0 , F, 0 , F,
F, 0 , 0 , 0 , F, 0 , F, 0 ,
0 , F, 0 , 0 , 0 , F, 0 , F,
F, 0 , F, 0 , 0 , 0 , F, 0 ,
0 , F, 0 , F, 0 , 0 , 0 , F,
F, 0 , F, 0 , F, 0 , 0 , 0 ,
0 , F, 0 , F, 0 , F, 0 , 0 ,
F, 0 , F, 0 , F, 0 , F, 0 ,
0 , F, 0 , F, 0 , F, 0 , F,
0 , 0 , F, 0 , F, 0 , F, 0 ,
0 , 0 , 0 , F, 0 , F, 0 , F,
F, 0 , 0 , 0 , F, 0 , F, 0 ,
0 , F, 0 , 0 , 0 , F, 0 , F,
F, 0 , F, 0 , 0 , 0 , F, 0 ,
0 , F, 0 , F, 0 , 0 , 0 , F,
F, 0 , F, 0 , F, 0 , 0 , 0 ,
0 , F, 0 , F, 0 , F, 0 , 0 ,
F, 0 , F, 0 , F, 0 , F, 0 ,
0 , F, 0 , F, 0 , F, 0 , F
}
} ;
int main( )
{
char answer[ ] = "__" ;
unsigned int hehehe = 0 ;
for ( int i = 0 ; i < NUM_GUESSES; ++ i)
{
printf ( "Enter a letter. %s\n " , answer
) ;
if ( asdf[ hehehe] [ guess] )
{
int efef = ( guess - SECRET[ 0 ] ) ;
answer[ efef] = SECRET[ efef] ;
hehehe |= ( 1 << efef) ;
}
else
{
printf ( "Letter not found, try again\n " ) ; }
if ( hehehe == 3 )
{
break ;
}
}
printf ( "The word was %s\n " , SECRET
) ; return 0 ;
}
CiNpbmNsdWRlIDxzdGRpby5oPgoKY29uc3QgaW50IE5VTV9HV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GkgPSAwOyBpIDwgTlVNX0dVRVNTRVM7ICsraSkKICAgIHsKICAgICAgICBwcmludGYoIkVudGVyIGEgbGV0dGVyLiAlc1xuIiwgYW5zd2VyKTsKICAgICAgICBjaGFyIGd1ZXNzID0gZ2V0Y2hhcigpOwogICAgICAgIGdldGNoYXIoKTsKCiAgICAgICAgaWYoYXNkZltoZWhlaGVdW2d1ZXNzXSkKICAgICAgICB7CiAgICAgICAgICAgIGludCBlZmVmID0gKGd1ZXNzIC0gU0VDUkVUWzBdKTsKICAgICAgICAgICAgYW5zd2VyW2VmZWZdID0gU0VDUkVUW2VmZWZdOwogICAgICAgICAgICBoZWhlaGUgfD0gKDEgPDwgZWZlZik7CiAgICAgICAgfQogICAgICAgIGVsc2UKICAgICAgICB7CiAgICAgICAgICAgIHByaW50ZigiTGV0dGVyIG5vdCBmb3VuZCwgdHJ5IGFnYWluXG4iKTsKICAgICAgICB9CgogICAgICAgIGlmIChoZWhlaGUgPT0gMykKICAgICAgICB7CiAgICAgICAgICAgIHByaW50ZigiWW91IHdpblxuIik7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgIH0KCiAgICBwcmludGYoIlRoZSB3b3JkIHdhcyAlc1xuIiwgU0VDUkVUKTsKICAgIHJldHVybiAwOwp9Cg==