Created
October 22, 2012 13:44
-
-
Save kav2k/3931576 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#define s(_)sizeof(_) | |
#define n void* | |
#define z(_)_,_,_ | |
#define x (s*)__ | |
#define y (s*)_ | |
#define h C(y,y) | |
#define o &d | |
#define t() (p) | |
#define w(_)_,_ | |
typedef n (*(*(*(*p)(n,n))(n,n))(n,n))(n,n); | |
typedef struct s { struct s* a ; struct s* UNUSED; } s; | |
typedef struct t { struct s* UNUSED; struct s* a ; } *t; | |
n __(n _,n __) { return _;}n _(n _,n __){return __; } | |
typedef unsigned char e; | |
#define _(_)((*_).a) | |
s* | |
w, | |
a={x ,x}, | |
b={x ,y}, | |
c={y,x},d={y,y};s l[]={&b,&d,w (w(w(w(w(w(&d)))))),w(&d),&c,&d,w(w(w( | |
&d))),&c,w(&b),&d,&a,z(&d),z(w (w(w(w(w(&d)))))),&b,&b,w(&d),&a,&b,w(& | |
d), z(w | |
(w( w(w | |
(&d))))),w(w(w(&d))), &b,&c,&d, &d,&a,&c ,w(w(&d)), &c,z(&b) ,w(&d),w(&a) | |
};s* C(s* a, s* b) {s* _=malloc(s(s));_(_)=a;_((t)_)=b;return _;}e k2=s(l | |
);p f(p | |
a,p b) | |
{ e k;s d;p v,r, q,i,C,c,u,g,m=t( ) | |
_ ( _(_(w)));C=t() _(_(&l[fread(&k,s(e ) | |
,s ( e),stdin)]));v =C(_,__);d=l[k=(e ) | |
C ( k2,k)];c=(u=a( b,_),i=(t()_((t ) | |
_ ( _(w))))(_,_(_(o)) ),(a(_(_((t)o)),(t( ) | |
_ ( _((t)o)))(_,__) ))(b(_((t)_((t)o) ) | |
, ( t()_((t)_((t)o))) (_,__)),_));{p a=t( ) | |
_ ( (t)_(o));{p b= C(_,i(u(_,__),_) ) | |
; { p u=C(_,(t()_(_(o) ))(_,__));_(_(_(w)) ) | |
= ( s*)i(__,_(_( _(w))));r=b(m(c,_ ) | |
,C ( m(_,(t()_(( t)_(_(w))))(_,__) ) | |
, ( f)));v=b(_,v);i =b(a(_,__),_);g=(b ) | |
( a(m(c(_,__),__ ),_),_);q=u(_((t ) | |
_ ( o)),_)((t()_( (t)_(_(w))))((t( ) | |
_ ( _((t)o)))(_(_((t )_(w))),(t()_(_((t ) | |
_ ( w))))(_,__))( _,__),_)(_,__),_ ) | |
;_ ( _((t)_(w))) = (s*)u(_((t)_(o)),_ ) | |
( (t()_((t)_(_(w)))) (_,__),_)(_(_((t)o) ) | |
,_ ( _((t)_(w))));} }_((t)_(_(w)))=(s* ) | |
q ( a=(t()_((t)_(_(w))) )(_,__),_((t)_(_(w))) ) | |
; fwrite((k=k,&k2) ,s(e),u(_,g)(s(e ) | |
, ( e)s(s[s(s[s(s[s (s)])])])),stdout ) | |
; fwrite((k2=k,&k) ,s(e),u(__,g)(s(e ) | |
, ( e)s(s[s(s[s(s[s (s)])])])),stdout ) | |
;_ ( _(_((t)w)))=(s*) u((t()_(_(_((t)w))) ) | |
( _,__),_(_(_((t)w ))));_(_((t)_(w)) ) | |
= ( s*)q(a(_(_((t) o)),_(_((t)_(w))) ) | |
,_ ( _((t)_(w))));} _((t)_(_((t)w)))=(s* ) | |
( t()_(_(_((t)w))) )(_((t)_(_((t)w)) ) | |
,u ( (t()_((t)_(_(( t)w))))(_,__),_((t ) | |
_ ( _((t)w)))));g =u((q=u(C(__,(t( ) | |
_ ( _(_((t)w))))(_((t )_(_((t)w))),_)),_) ) | |
( _,__),g);v=g( __,i(u(_,i(f,_) ) | |
( _(_((t)o)),_( (t)_((t)o))),v) ) | |
,r= q(_ | |
,g( f,i | |
(v(f,(_(_(_(w)))=(s*)m,_)),r)));return q(_,v)(r(g(__,a),g(__,b)),r);} | |
int main | |
(){w=C(C(h,h),C(h,h));return printf((e*)f(_,_)("OK\n","\n ^ Error\n" | |
"" )) | |
;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment