#include <stdio.h>
#include <stdlib.h>
#include <time.h>
typedef struct {
char na[64];
int stts[6];
} Monster;
Monster creMonster(){
int i, k;
Monster tmp;
for(i = 0; i < k; i++)
tmp.
na[i
] = 'a' + rand() % 26; tmp.na[k] = '\0';
for(i = 0; i < 6; i++)
tmp.
stts[i
] = rand() % 255 + 1; return tmp;
}
void priMonster(Monster m){
for(int i = 0; i < 6; i++)
}
int main(){
int i, n;
Monster *monsters;
monsters
= (Monster
*)malloc(n
* sizeof(Monster
));
if(monsters == NULL){
return 0;
}
for(i = 0; i < n; i++){
monsters[i] = creMonster();
priMonster(monsters[i]);
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHRpbWUuaD4gCgp0eXBlZGVmIHN0cnVjdCB7CiAgICBjaGFyIG5hWzY0XTsKICAgIGludCBzdHRzWzZdOwp9IE1vbnN0ZXI7CgpNb25zdGVyIGNyZU1vbnN0ZXIoKXsKICAgIGludCBpLCBrOwogICAgTW9uc3RlciB0bXA7CiAgICBrID0gcmFuZCgpICUgOCArIDQ7CiAgICBmb3IoaSA9IDA7IGkgPCBrOyBpKyspIAogICAgICAgIHRtcC5uYVtpXSA9ICdhJyArIHJhbmQoKSAlIDI2OwogICAgdG1wLm5hW2tdID0gJ1wwJzsKICAgIGZvcihpID0gMDsgaSA8IDY7IGkrKykgCiAgICAgICAgdG1wLnN0dHNbaV0gPSByYW5kKCkgJSAyNTUgKyAxOwogICAgcmV0dXJuIHRtcDsKfQoKdm9pZCBwcmlNb25zdGVyKE1vbnN0ZXIgbSl7CiAgICBwcmludGYoIiUxMnMgIDogIiwgbS5uYSk7CiAgICBmb3IoaW50IGkgPSAwOyBpIDwgNjsgaSsrKQogICAgICAgIHByaW50ZigiJTNkICIsIG0uc3R0c1tpXSk7CiAgICBwcmludGYoIlxuIik7Cn0KCmludCBtYWluKCl7CiAgICBzcmFuZCgodW5zaWduZWQpdGltZShOVUxMKSk7IAogICAgaW50IGksIG47CiAgICBNb25zdGVyICptb25zdGVyczsKICAgIHNjYW5mKCIlZCIsICZuKTsKICAgIAogICAgbW9uc3RlcnMgPSAoTW9uc3RlciAqKW1hbGxvYyhuICogc2l6ZW9mKE1vbnN0ZXIpKTsKICAgIAogICAgaWYobW9uc3RlcnMgPT0gTlVMTCl7CiAgICAgICAgcHJpbnRmKCJFUlJPUlxuIik7CiAgICAgICAgcmV0dXJuIDA7CiAgICB9CiAgICBmb3IoaSA9IDA7IGkgPCBuOyBpKyspewogICAgICAgIG1vbnN0ZXJzW2ldID0gY3JlTW9uc3RlcigpOwogICAgICAgIHByaW50ZigiJTAzZCAgIiwgaSArIDEpOwogICAgICAgIHByaU1vbnN0ZXIobW9uc3RlcnNbaV0pOwogICAgfQogICAgZnJlZShtb25zdGVycyk7CiAgICByZXR1cm4gMDsKfQ==