#include <stdio.h>
int main(void)
{
FILE *fp1, *fp2;
char fname1[256], fname2[256], fname3[256], str[256];
int ch, line, col, linecnt=1, colcnt=1, out=0;
if ((fp1
= fopen(fname1
, "rt")) == NULL
) { printf("Can't open input file(%s)\n", fname1
); return 1;
}
if ((fp2
= fopen(fname2
, "w")) == NULL
) { printf("Can't open output file(%s)\n", fname2
); return 1;
}
while ((ch
= fgetc(fp1
)) != EOF
) { if (out == 0 && line == linecnt && col == colcnt){
out = 1;
}
if (ch == '\n') {
linecnt++;
colcnt = 1;
}else{
colcnt++;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKQp7CiAgRklMRSAqZnAxLCAqZnAyOwogIGNoYXIgZm5hbWUxWzI1Nl0sIGZuYW1lMlsyNTZdLCBmbmFtZTNbMjU2XSwgc3RyWzI1Nl07CiAgaW50IGNoLCBsaW5lLCBjb2wsIGxpbmVjbnQ9MSwgY29sY250PTEsIG91dD0wOwoKICBwcmludGYoImZpbGVuYW1lOiIpOyBzY2FuZigiJXMiLCBmbmFtZTEpOwogIGlmICgoZnAxID0gZm9wZW4oZm5hbWUxLCAicnQiKSkgPT0gTlVMTCkgewogICAgcHJpbnRmKCJDYW4ndCBvcGVuIGlucHV0IGZpbGUoJXMpXG4iLCBmbmFtZTEpOwogICAgcmV0dXJuIDE7CiAgfQogIHN0cmNweShmbmFtZTIsIGZuYW1lMSk7CiAgc3RyY2F0KGZuYW1lMiwgIi5vdXQiKTsKICBpZiAoKGZwMiA9IGZvcGVuKGZuYW1lMiwgInciKSkgPT0gTlVMTCkgewogICAgcHJpbnRmKCJDYW4ndCBvcGVuIG91dHB1dCBmaWxlKCVzKVxuIiwgZm5hbWUyKTsKICAgIGZjbG9zZShmcDEpOwogICAgcmV0dXJuIDE7CiAgfQoKICBzdHJjcHkoZm5hbWUzLCBmbmFtZTEpOwogIHN0cmNhdChmbmFtZTMsICIuYmFrIik7CiAgcmVtb3ZlKGZuYW1lMy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