#include <stdio.h>
void statusview(char status){
char* str[] = {"", "毒", "麻痺", "石化", "混乱", "沈黙"};
if(!status){
return;
}else if(status & 1){
return;
}
int i;
for(i = 0; status; status>>=1, ++i)
if(status
& 1)printf("%s ", str
[i
]); }
int main(void){
int n;
char now = 0;
do{
printf("1:毒 2:麻痺 3:石化 4:混乱 5:沈黙 6:全回復 0:終了\n"); if(n == 6) now = 0;
else now |= 1<<n;
statusview(now);
}while(n);
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHN0YXR1c3ZpZXcoY2hhciBzdGF0dXMpewogICAgY2hhciogc3RyW10gPSB7IiIsICLmr5IiLCAi6bq755e6IiwgIuefs+WMliIsICLmt7fkubEiLCAi5rKI6buZIn07CiAgICBpZighc3RhdHVzKXsKICAgICAgICBwcmludGYoIueKtuaFi+eVsOW4uOOBquOBl1xuIik7CiAgICAgICAgcmV0dXJuOwogICAgfWVsc2UgaWYoc3RhdHVzICYgMSl7CiAgICAgICAgcHJpbnRmKCLntYLkuoZcbiIpOwogICAgICAgIHJldHVybjsKICAgIH0KICAgIGludCBpOwogICAgZm9yKGkgPSAwOyBzdGF0dXM7IHN0YXR1cz4+PTEsICsraSkKICAgICAgICBpZihzdGF0dXMgJiAxKXByaW50ZigiJXMgIiwgc3RyW2ldKTsKICAgIHByaW50ZigiXG4iKTsKfQppbnQgbWFpbih2b2lkKXsKICAgIGludCBuOwogICAgY2hhciBub3cgPSAwOwogICAgZG97CiAgICAgICAgcHJpbnRmKCIxOuavkuOAgDI66bq755e644CAMzrnn7PljJbjgIA0Oua3t+S5seOAgDU65rKI6buZ44CANjrlhajlm57lvqnjgIAwOue1guS6hlxuIik7CiAgICAgICAgc2NhbmYoIiVkIiwgJm4pOwogICAgICAgIGlmKG4gPT0gNikgbm93ID0gMDsKICAgICAgICBlbHNlIG5vdyB8PSAxPDxuOwogICAgICAgIHN0YXR1c3ZpZXcobm93KTsKICAgIH13aGlsZShuKTsKfQo=