#define _CRT_SECURE_NO_WARNINGS // for VC++
#include <stdio.h>
#include <string.h>
#define BUF 256
int main(int argc, char *argv[])
{
char *psei;
FILE *pf;
char buf[BUF], kanji[BUF], yomi[BUF];
int flag = 0;
if (argc != 2) {
return 1;
}
psei = argv[1];
pf
= fopen("data.txt", "rt"); if (pf == NULL) {
printf("ファイルのオープンに失敗しました。\n"); return 1;
}
while (fgets(buf
, sizeof buf
, pf
) != NULL
) { if (sscanf(buf
, "%s %s", kanji
, yomi
) != 2) { continue;
}
if (strcmp(kanji
, psei
) == 0) { flag = 1;
break;
}
}
if (flag == 0) {
}
return 0;
}
I2RlZmluZSBfQ1JUX1NFQ1VSRV9OT19XQVJOSU5HUyAvLyBmb3IgVkMrKwoKI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCiNkZWZpbmUgQlVGIDI1NgoKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkKewoJY2hhciAqcHNlaTsKCUZJTEUgKnBmOwoJY2hhciBidWZbQlVGXSwga2FuamlbQlVGXSwgeW9taVtCVUZdOwoJaW50IGZsYWcgPSAwOwoKCWlmIChhcmdjICE9IDIpIHsKCQlwcmludGYoInVzYWdlOiB5b21pIOa8ouWtl+OBruWnk1xuIik7CgkJcmV0dXJuIDE7Cgl9Cglwc2VpID0gYXJndlsxXTsKCglwZiA9IGZvcGVuKCJkYXRhLnR4dCIsICJydCIpOwoJaWYgKHBmID09IE5VTEwpIHsKCQlwcmludGYoIuODleOCoeOCpOODq+OBruOCquODvOODl+ODs+OBq+WkseaVl+OBl+OBvuOBl+OBn+OAglxuIik7CgkJcmV0dXJuIDE7Cgl9CgoJd2hpbGUgKGZnZXRzKGJ1Ziwgc2l6ZW9mIGJ1ZiwgcGYpICE9IE5VTEwpIHsKCQlpZiAoc3NjYW5mKGJ1ZiwgIiVzICVzIiwga2FuamksIHlvbWkpICE9IDIpIHsKCQkJY29udGludWU7CgkJfQoJCW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