七行プログラミング

このエントリーをはてなブックマークに追加
#include <iostream>
unsigned W,O,u=256,i,l,K,b,a[256],R=~0,y=1<<24,x=u;main(int,char**V){char*t=new
char[y];if(*V[1]-69){cin>>O;cin.read(t,5);for(W=t[1]*y|t[2]<<16|t[3]*x|t[4];l<O
;R*=a[b]){for(K=b=0;R<y;R*=x)W=W*x|cin.get();for(R/=u++;W/R>=K;K+=a[b++]+1);W-=
R*(K-++a[t[l++]=--b]);}}else{for(;~(i=cin.get());K=W,l++){for(b=0;b<i;W+=R/u*(a
[b++]+1));if(K>W)for(K=O;!++t[--K];);for(R=R/u++*++a[i];R<y;R*=x)t[O++]=W/y,W*=
x;}cout<<l<<' ';t[O++]=W/y;t[O++]=W>>16;t[O++]=W/x;t[O++]=W;}cout.write(t,O);}

正真正銘到達age
です