#pragma GCC optimize("Ofast") #pragma GCC target("avx2") char*mmap(); main(){ char*rp=mmap(0l,7*100001,1,2,0,0ll); while(*rp++!=10); long a,b=0; int c=0,d=0; do{ a=0; do{ a=a<<8|*rp++; }while(*rp>=48); ++rp; c+=d=!d|a==b; b=a; }while(*rp); char wbuf[16],*wp=wbuf+sizeof wbuf; while(*--wp=c%10+48,c/=10); write(1,wp,(wbuf+sizeof wbuf)-wp); _exit(0); }