02/09/06 23:49
>>736 + >>728 の6行書庫
#まだ100文字程あるから前スレRLEでも7行いけるかな?
#include <stdio.h>
FILE*f,*o;char n[256];int i,c,b,p,q;r(){return b?getc(f):i<=0?-1:getc(o);}w(x){
putc(x,b?o:f);}main(a,v)char**v;{for(!(b=a-1)?a=getw(o=stdin):putw(a,o=stdout);
--a;b*~p?w(p),w(q):0)for(f=fopen(b?v[++i]:gets(n),b?"rb":"wb"),b?fseek(f,q=0,2)
,puts(v[i]),putw(ftell(f),o),rewind(f),0:(i=getw(o)),p=r();~(c=r());p=b?q=q>254
||p-c?w(p),w(q),0:q+1,c:r())for(b||(i+=~c);!b&&~c--;)w(p);}