#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+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHRpbWUuaD4KCnR5cGVkZWYgc3RydWN0IHsKICAgIGNoYXIgbmFbNjRdOwogICAgaW50IHN0dHNbNl07Cn0gTW9uc3RlcjsKCk1vbnN0ZXIgY3JlTW9uc3RlcigpewogICAgaW50IGksazsKICAgIE1vbnN0ZXIgdG1wOwogICAgayA9IHJhbmQoKSU4KzQ7CiAgICBpbnQgYSA9ICdhJyArIHJhbmQoKSUyNjsKICAgIGZvcihpPTA7aTxrO2krKykKICAgIHsKICAgIAl0bXAubmFbaV0gPSAnYScgKyByYW5kKCklMjY7CiAgICB9CiAgICB0bXAubmFba10gPSAnXDAnOwogICAgZm9yKGk9MDtpPDY7aSsrKQogICAgewogICAgCXRtcC5zdHRzW2ldID0gcmFuZCgpJTI1NSsxOwogICAgfQogICAgcmV0dXJuIHRtcDsKfQoKdm9pZCBwcmlNb25zdGVyKE1vbnN0ZXIgbSl7CiAgICBwcmludGYoIiUxMnMgIDogIixtLm5hKTsKICAgIGZvcihpbnQgaT0wO2k8NjtpKyspCiAgICB7CiAgICAJcHJpbnRmKCIlM2QgIixtLnN0dHNbaV0pOwogICAgfQogICAgcHJpbnRmKCJcbiIpOwp9CgppbnQgbWFpbigpewogICAgc3JhbmQoKHVuc2lnbmVkKXRpbWUoTlVMTCkpOwogICAgaW50IGksIG47CiAgICBNb25zdGVyICptb25zdGVyczsKICAgIHNjYW5mKCIlZCIsJm4pOwogICAgbW9uc3RlcnM9KE1vbnN0ZXIgKiltYWxsb2MobiAqc2l6ZW9mKE1vbnN0ZXIpKTsKICAgIGlmKG1vbnN0ZXJzID09IE5VTEwpewogICAgICAgIHByaW50ZigiRVJST1JcbiIpOwogICAgICAgIHJldHVybiAwOwogICAgfQogICAgZm9yKGk9MDtpPG47aSsrKXsKICAgICAgICBtb25zdGVyc1tpXSA9IGNyZU1vbnN0ZXIoKTsKICAgICAgICBwcmludGYoIiUwM2QgICIsaSsxKTsKICAgICAgICBwcmlNb25zdGVyKG1vbnN0ZXJzW2ldKTsKICAgIH0KICAgIGZyZWUobW9uc3RlcnMpOwogICAgcmV0dXJuIDA7Cn0=