#include <stdio.h>
#include <stdlib.h>
void loop (void);
void in_proc(char *);
char *in_proc_child(char *);
int main(int argc, char** argv) {
loop();
return (EXIT_SUCCESS);
}
void loop (void) {
char *c, s[500];
while (1) {
if ((int)c == EOF || (int)c == NULL )
break;
in_proc(s);
}
return;
}
void in_proc (char *s) {
s = in_proc_child(s);
if (s != NULL) {
}
return;
}
char *in_proc_child(char *s) {
int i, cnt = 0;
char c;
for (i = 0; i < len; i++) {
c = *(s + i);
if (c == ' ') {
++cnt;
if (cnt >= 2)
return s + i + 1;
}
/* if (c >= '0' && c <= '9' && gflg == TRUE) {
flg = TRUE;
} else {
if (c != ' ' && (c < '0' || c > '9'))
gflg = FALSE;
if (c == ' ' && gflg == TRUE) {
++cnt;
flg = FALSE;
if (cnt >= 2)
return ++s;
} else if (c == ' ') {
gflg = TRUE;
flg = FALSE;
}
}
s++;
*/
}
return NULL;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4Kdm9pZCBsb29wICh2b2lkKTsKdm9pZCBpbl9wcm9jKGNoYXIgKik7CmNoYXIgKmluX3Byb2NfY2hpbGQoY2hhciAqKTsKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIqKiBhcmd2KSB7CiAgICBsb29wKCk7CiAgICByZXR1cm4gKEVYSVRfU1VDQ0VTUyk7Cn0Kdm9pZCBsb29wICh2b2lkKSB7CiAgICBjaGFyICpjLCBzWzUwMF07IAogICAgd2hpbGUgKDEpIHsKICAgICAgICBjID0gZ2V0cyhzKTsKICAgICAgICBpZiAoKGludCljID09IEVPRiB8fCAoaW50KWMgPT0gTlVMTCApCiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIGluX3Byb2Mocyk7CiAgICB9CiAgICByZXR1cm47Cn0Kdm9pZCBpbl9wcm9jIChjaGFyICpzKSB7CiAgICBzID0gaW5fcHJvY19jaGlsZChzKTsKICAgIGlmIChzICE9IE5VTEwpIHsKICAgICAgICBwcmludGYgKCIlc1xuIiwgcyk7CiAgICB9CiAgICByZXR1cm47Cn0KY2hhciAqaW5fcHJvY19jaGlsZChjaGFyICpzKSB7CiAgICBpbnQgaSwgY250ID0gMDsKICAgIGNoYXIgYzsKICAgIGludCBsZW4gPSBzdHJsZW4ocyk7CiAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspIHsKICAgICAgICBjID0gKihzICsgaSk7CiAgICAgICAgaWYgKGMgPT0gJyAnKSB7CiAgICAgICAgICAgICsrY250OwogICAgICAgICAgICBpZiAoY250ID49IDIpCiAgICAgICAgICAgICAgICByZXR1cm4gcyArIGkgKyAxOwogICAgICAgIH0KLyogICAgICAgIGlmIChjID49ICcwJyAmJiBjIDw9ICc5JyAmJiBnZmxnID09IFRSVUUpIHsKICAgICAgICAgICAgZmxnID0gVFJVRTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBpZiAoYyAhPSAnICcgJiYgKGMgPCAnMCcgfHwgYyA+ICc5JykpCiAgICAgICAgICAgICAgICAgICAgZ2ZsZyA9IEZBTFNFOwogICAgICAgICAgICBpZiAoYyA9PSAnICcgJiYgZ2ZsZyA9PSBUUlVFKSB7CiAgICAgICAgICAgICAgICArK2NudDsKICAgICAgICAgICAgICAgIGZsZyA9IEZBTFNFOwogICAgICAgICAgICAgICAgaWYgKGNudCA+PSAyKQogICAgICAgICAgICAgICAgICAgIHJldHVybiArK3M7CiAgICAgICAgICAgIH0gZWxzZSBpZiAoYyA9PSAnICcpIHsKICAgICAgICAgICAgICAgIGdmbGcgPSBUUlVFOwogICAgICAgICAgICAgICAgZmxnID0gRkFMU0U7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcysrOwoqLwogICAgfQogICAgcmV0dXJuIE5VTEw7Cn0K