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