#include <stdio.h>
#include <ctype.h>
// gcc49 なら bool 使えたっけ?
#define TRUE 1
#define FALSE 0
int main(void)
{
FILE *fp = stdin; // 手抜き
//fp = fopen("text.txt", "r");
int newLineComes = TRUE;
int c;
while( (c
= fgetc( fp
)) != EOF
){ if (newLineComes) { // 新しい行が来たぜ
}
newLineComes = FALSE; // もう新しくないぜ。
}
/* 改行だけが続けて来た場合にも、「次は新しい行」と解釈すべきだから、ここに else は入れないぜ */
if (c == '\n') {
newLineComes = TRUE; // 次は新しい行が来るぜ
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxjdHlwZS5oPgoKLy8gZ2NjNDkg44Gq44KJIGJvb2wg5L2/44GI44Gf44Gj44GR77yfCiNkZWZpbmUgVFJVRSAxCiNkZWZpbmUgRkFMU0UgMAoKaW50IG1haW4odm9pZCkKewogICAgRklMRSAqZnAgPSBzdGRpbjsJLy8g5omL5oqc44GNCiAgICAvL2ZwID0gZm9wZW4oInRleHQudHh0IiwgInIiKTsKCWludCAgbmV3TGluZUNvbWVzID0gVFJVRTsKICAgIGludCBjOwogICAgcHJpbnRmKCItLS3vvpTvvpnvvb7vvp5cbiIpOwogICAgd2hpbGUoIChjID0gZmdldGMoIGZwICkpICE9IEVPRiApewogICAgCWlmIChuZXdMaW5lQ29tZXMpIHsJCS8vIOaWsOOBl+OBhOihjOOBjOadpeOBn+OBnAogICAgCQlpZiAoaXNsb3dlcihjKSkgewkvLyDpoK3mloflrZfjgYzlsI/mloflrZfjga7loLTlkIjjga8KICAgIAkJCWMgPSB0b3VwcGVyKGMpOwkvLyDlpKfmloflrZfjgavlpInmj5sKICAgIAkJfQogICAgCQluZXdMaW5lQ29tZXMgPSBGQUxTRTsgLy8g44KC44GG5paw44GX44GP44Gq44GE44Gc44CCCiAgICAJfQogICAgCS8qIOaUueihjOOBoOOBkeOBjOe2muOBkeOBpuadpeOBn+WgtOWQiOOBq+OCguOAgeOAjOasoeOBr+aWsOOBl+OBhOihjOOAjeOBqOino+mHiOOBmeOBueOBjeOBoOOBi+OCieOAgeOBk+OBk+OBqyBlbHNlIOOBr+WFpeOCjOOBquOBhOOBnCAqLwogICAgCWlmIChjID09ICdcbicpIHsKICAgIAkJbmV3TGluZUNvbWVzID0gVFJVRTsJLy8g5qyh44Gv5paw44GX44GE6KGM44GM5p2l44KL44GcCiAgICAJfQogICAgICAgIHByaW50ZiggIiVjIiwgYyApOwogICAgfQogICAgcHJpbnRmKCItLS3vvbXvvpzvvoBcbiIpOwogICAgZmNsb3NlKGZwKTsKICAgIHJldHVybiAwOwp9Cg==