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