#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
main( ) {
char valid_chars[ 27 ] ;
char mat_cript[ 10 ] [ 10 ] ;
char frase[ 10 ] ;
strcpy ( valid_chars
, "abcdefghijklmnopqrstuvwxyz" ) ;
for ( int i = 0 ; i < 10 ; i++ ) {
for ( int j = 0 ; j < 10 ; j++ ) {
int control
= ( rand ( ) % 26 ) ;
mat_cript[ i] [ j] = valid_chars[ control] ;;
}
}
for ( int i = 0 ; i < num; i++ ) {
mat_cript[ 5 ] [ i] = frase[ i] ;
}
for ( int i = 0 ; i < 10 ; i++ ) {
for ( int j = 0 ; j < 10 ; j++ ) {
printf ( "\t %c" , mat_cript
[ i
] [ j
] ) ; }
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8dGltZS5oPiAKCm1haW4oKXsKCWNoYXIgdmFsaWRfY2hhcnNbMjddOwoJCiAgICBjaGFyIG1hdF9jcmlwdFsxMF1bMTBdOwogICAgY2hhciBmcmFzZVsxMF07CgoJc3JhbmQodGltZShOVUxMKSk7CgoJc3RyY3B5KHZhbGlkX2NoYXJzLCAiYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoiKTsKCiAgICBzdHJjcHkoZnJhc2UsICJuYXJ1dG8iKTsKICAgIGludCBudW0gPSBzdHJsZW4oZnJhc2UpOwogICAgCglmb3IoaW50IGkgPSAwOyBpIDwgMTA7IGkrKyl7CgkgICAgZm9yKGludCBqID0gMDsgaiA8IDEwOyBqKyspewoJICAgIAlpbnQgY29udHJvbCA9IChyYW5kKCkgJSAyNik7CgkgICAgCQoJICAgICAgICBtYXRfY3JpcHRbaV1bal0gPSB2YWxpZF9jaGFyc1tjb250cm9sXTs7CgkgICAgfQogICAgfQogICAgZm9yKGludCBpID0gMDsgaSA8IG51bTsgaSsrKXsKICAgICAgICBtYXRfY3JpcHRbNV1baV0gPSBmcmFzZVtpXTsKICAgIH0KCiAgICBmb3IoaW50IGkgPSAwOyBpIDwgMTA7IGkrKyl7CiAgICAgICAgZm9yKGludCBqID0gMDsgaiA8IDEwOyBqKyspewogICAgICAgICAgICBwcmludGYoIlx0JWMiLCBtYXRfY3JpcHRbaV1bal0pOwogICAgICAgIH0KICAgICAgICBwcmludGYoIlxuIik7CiAgICB9Cn0g