-
-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathdavidguy.c
More file actions
34 lines (34 loc) · 1.75 KB
/
davidguy.c
File metadata and controls
34 lines (34 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#define u unsigned
#define w char*
#define j(x)(*(*(x*)&T)++)
#define H j(short*)
#define K j(w)
#define e j(u*)
#define r register u
#define R(b)write(A,T=h,4*b);
#define S (u*)sbrk(Q*4+U*8)+U
#define E(a,b,c)a=c&1<<31|b/2;c=c*2|b&1;
#define V q= *L;L+=F;E(d,q,x)E(f,d,s)g=f&q;f^=q
#define W while(
#define Z q=I&f;M|=q&c;c^=q;I^=f;M|=g&c;c^=g
#define Y W(F= *s++)&16)*T=10**T+F-'0';T++
#define D(q,s)c);W q>s)G= *--q,*q= *s,*s++=G;
#define P if(i^z){x=Q+(n=D(x,n)
#define C if(i){q=Q*4+(s=(w)D(q,s)
u A,U,Q,J,X[9999];main(a,b)w*b;{r*c,*d,y,f,g,F,G,I,M,N,z,*x,*n,i,B,O;w q,*h=(w
)X,*T,*s;T=h;if(a>1){H=2;K=23;K=112;s=b[1];Y;Y;Y;Y;}else{s=".slo.-W00,tmhw.W/"
;H=1;W*s)K=1+*s++;K=0;}s=T;H=17004;H=11;e=0;e=0;i=66==*s;W connect(A=socket(a,
3-Q++,0),h,24-a*4)||write(A,s,12)!=12||read(A,T,8)!=8);e;H;read(A,h,4*H);T=h;e
;F=e;e;e;I=11+H;f=H-6;K;U=K;i^=K;z=!K;T+=I/4*4+8*U;I=e;e;O=e;B=e;e;U=H/32;J=H/
30*30;T+=14;M=K;f/=U;T=h;K=55;K;H=6;e=F;e=I;e=12;e=B;e=O;R(6)B=F+8192;K=53;K=1
;H=4;e=B;e=I;H=U*32;H=J;R(4)O=B+8192;K=55;K;H=4;e=O;e=B;e=0;R(4)N=O+8192;K=53;
K=M;H=4;e=N;e=I;H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