[quote=Andre Brito]…
E o mais interessante de tudo: o código funciona e resolveu um SRM no TopCoder.[/quote]
Isso daí não é lixo. Isso daí é obfuscated C++.
Acredite, isso é mais uma obra de arte do que um lixo. Fazer códigos assim e que funcionem requer conhecimento muito profundo da linguagem e bastante dedicação.
Uma vez eu participei do IOCCC, mas não fui classificado. O meu programa era o seguinte:
[code]#ifdef
Because
By John Lennon and Paul McCartney
Aaaaaahhhhh.
Because the world is round it turns me on.
Because the world is round - Aaaaaahhhhh.
Because the wind is high it blows my mind.
Because the wind is high - Aaaaaahhhhh.
Love is old, love is new.
Love is all, love is you.
Because the sky is blue it makes me cry.
Because the sky is blue - Aaaaaahhhhh.
Aaaaaahhhhh.
Aaaaaahhhhh.
Aaaaaahhhhh.
obfuscated c
#else
#define I Love you
#define all // is // obfuscated //
#define hello world
#define Because obfuscated =
#define is , o/* Ringo Starr /
#define a “dddJ=dR7,6dP”/ Beatles /
#/fine beautiful /define Aaaaaahhhhh o; o&1969; o0
#define song international obfuscated?c:code; contest
#define By / George Harrison / char C = 9 , ioccc []={
#define Paul a")6676d%6(dT%90dQ+K%:86)=\x92\x92"Yoko"\x92"};char
#define McCartney __=0,OO; struct o0{ char**o0,obfuscated,o; } o0; Y(){ int
#define and ,"-8d07?;d1=d1-6(v\x92" , “-8d1%3);d1)d+:=v\x92” ,“J)+%9;)\x92”
#define John “P7>)d-;d70(pd07>)d-;d6)?p\x92P7>)d-;d%00pd07>)d-;d=79v\x92\x92”
#define Lennon ,"?7:0(d-;d"":796(d", “?-6(d-;d,-/,d” ,";3=d""-;d"
“09)d”,“J)+%9;)d8,)d”,"-8d89:6" “;d1)d76v\x92”
#define wind } O0(O /* Paul McCartney John Lennon */
#define blows o=-o; oo(o,0),oo(o+ OO,o^o),oo((o,
#define my o,o-o-o-o-o-o )/-o,o-o), oo(
#define mind o,O^O),oo(10, o&~o blue; if
/efine and /( o <love ) return 2 ; {o0
#define blue round / 1969 } Liverpool /
#define sky } main(_ / ; The Beatles /
#define makes >-(OO=4)?(o0 .o0=ioccc,__?
/*efine my */0:X(=-(__= 1),oo(OO2,0))
#define heart oo(OO,0),> - OO?O0(-,):_
#define sadly ,==-2?oo(0,0 ):OO,main(–)
#define cry heart sadly): for;{return o0
#define for X(X(X(|))); / { 1969 } /
#define me ,/ Beatles ; { Yoko Ono */
define Ono “E%%%%%,v”
#define Love obfuscated ; char**u=ioccc
/efine our /; * ioccc= O0(C,OO); love
#define round ) / } Album: Abbey Road /
#define world /puts (Hello World)/} oo(O
#define you =puts(“Hello” " World!") ,o0
#define are - i++; ; ; ioccc . o0[b] ++ ;
#define on oo(O, ++o):0; if(__!=love)return; { o0
#define it { int h = __, love = 0x99 ; ; ; ; ; ; ;
define Yoko , Ono “\x92”,"qd"Ono “\x92”
#define turns o0.o0[O|O][o] ? putchar( love - (o0.o0
/efine 1969 /[O| O ] [o] ^( 0+ 29 high) round
#define old =__;} X(x){oo(C, 0);return; int _
#define c/ Beatles/; C; }
#define the/*; { } { } / 69;
#define high ) / ioccc */
#define new =love; o0
#include FILE
#endif[/code]
Sim, isso compila e roda.
[quote]Because is a beautiful song By Paul McCartney and John Lennon
wind blows my mind and blue sky makes my heart sadly cry for me
Love our round world you are on it
turns 1969 old[/quote]
EDIT: O word-wrapping bagunça todo o layout
Vou anexar como arquivo.