#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+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHRpbWUuaD4gCiAKdHlwZWRlZiBzdHJ1Y3QgewogICAgY2hhciBuYVs2NF07CiAgICBpbnQgc3R0c1s2XTsKfSBNb25zdGVyOwogCk1vbnN0ZXIgY3JlTW9uc3RlcigpewogICAgaW50IGksazsKICAgIE1vbnN0ZXIgdG1wOwogICAgayA9IHJhbmQoKSU4KzQ7CiAgICBpbnQgYSA9ICdhJyArIHJhbmQoKSUyNjsKICAgIGZvcihpPTA7aTxrO2krKykgdG1wLm5hW2ldID0gJ2EnICsgcmFuZCgpJTI2OwogICAgdG1wLm5hW2tdID0gJ1wwJzsKICAgIGZvcihpPTA7aTw2O2krKykgdG1wLnN0dHNbaV0gPSByYW5kKCklMjU1KzE7CiAgICByZXR1cm4gdG1wOwp9CiAKdm9pZCBwcmlNb25zdGVyKE1vbnN0ZXIgbSl7CiAgICBwcmludGYoIiUxMnMgIDogIixtLm5hKTsKICAgIGZvcihpbnQgaT0wO2k8NjtpKyspCiAgICAgICAgcHJpbnRmKCIlM2QgIixtLnN0dHNbaV0pOwogICAgcHJpbnRmKCJcbiIpOwp9CiAKaW50IG1haW4oKXsKICAgIHNyYW5kKCh1bnNpZ25lZCl0aW1lKE5VTEwpKTsgCiAgICBpbnQgaSwg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