#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(sizeof(Monster
)*n
);
if(monsters == NULL){
return 0;
}
for(i=0;i<n;i++){
monsters[i] = creMonster();
priMonster(monsters[i]);
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHRpbWUuaD4KCnR5cGVkZWYgc3RydWN0IHsKCWNoYXIgbmFbNjRdOwoJaW50IHN0dHNbNl07Cn0gTW9uc3RlcjsKCk1vbnN0ZXIgY3JlTW9uc3RlcigpewoJaW50IGksazsKCU1vbnN0ZXIgdG1wOwoJayA9IHJhbmQoKSU4KzQ7CglpbnQgYSA9ICdhJyArIHJhbmQoKSUyNjsKCWZvcihpPTA7aTxrO2krKykgdG1wLm5hW2ldID0gJ2EnICsgcmFuZCgpJTI2OwoJdG1wLm5hW2tdID0gJ1wwJzsKCWZvcihpPTA7aTw2O2krKykgdG1wLnN0dHNbaV0gPSByYW5kKCklMjU1KzE7CglyZXR1cm4gdG1wOwp9Cgp2b2lkIHByaU1vbnN0ZXIoTW9uc3RlciBtKXsKCXByaW50ZigiJTEycyAgOiAiLG0ubmEpOwoJZm9yKGludCBpPTA7aTw2O2krKyl7CgkJcHJpbnRmKCIlM2QgIixtLnN0dHNbaV0pOwoJfQoJcHJpbnRmKCJcbiIpOwp9CgppbnQgbWFpbigpewoJc3JhbmQoKHVuc2lnbmVkKXRpbWUoTlVMTCkpOwoJaW50IGksIG47CglNb25zdGVyICptb25zdGVyczsKCXNjYW5mKCIlZCIsJm4pOwoJbW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