Obfuscate Code Contest 3!

Online C++ programming contests.

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard, raimo

Postby Darobat » Mon Nov 15, 2004 6:03 pm

Beer Hunter, Your entry is scary. lol. And yes thats OK format for it.
Code: Select all
#include <stdio.h>
struct W{char m,M[4??),w;void x(char
*W)??<w^=w;while(w[W]!=0)putchar(W[w
]^M[w++%5??));}W():m(040),w(0){char*
X="d@PLfAU\x05P)sHEMoTTPF""\31";for(
;w<5;w++[M??)=m++);x(X);}}w;main(){}
User avatar
Darobat
Moderator
 
Posts: 2572
Joined: Sat Sep 27, 2003 1:19 pm

Postby schloob » Sun Nov 21, 2004 11:15 am

did you get mine? just making sure!
:]
User avatar
schloob
 
Posts: 1853
Joined: Mon Feb 16, 2004 10:29 am
Location: Seattle

Postby Darobat » Wed Nov 24, 2004 5:37 pm

5 Working entries including mine

6 days left!
Code: Select all
#include <stdio.h>
struct W{char m,M[4??),w;void x(char
*W)??<w^=w;while(w[W]!=0)putchar(W[w
]^M[w++%5??));}W():m(040),w(0){char*
X="d@PLfAU\x05P)sHEMoTTPF""\31";for(
;w<5;w++[M??)=m++);x(X);}}w;main(){}
User avatar
Darobat
Moderator
 
Posts: 2572
Joined: Sat Sep 27, 2003 1:19 pm

Postby exomo » Wed Nov 24, 2004 11:32 pm

Darobat wrote:5 Working entries including mine

I'll try one more time. If i doesn't work on the next attempt I give up.
Who needs a signature anyway.
User avatar
exomo
 
Posts: 935
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Postby Beer Hunter » Wed Dec 01, 2004 3:52 am

It seems that we have reached the deadline. Here's my entry.
User avatar
Beer Hunter
 
Posts: 912
Joined: Sat Dec 13, 2003 7:12 pm
Location: Australia

Postby gamma » Wed Dec 01, 2004 4:02 am

Beer Hunter wrote:It seems that we have reached the deadline. Here's my entry.

In that case: my entry

IMHO: A lot shorter, less readable, more cryptic, more f*cked up and... a nice graphical design of the source code ;-).

And... don't forget, although the program compiles on a C-compiler, it won't let you play the game :twisted:
while (true){sleep(28800);work(57600);}
"Free" as in speech is so much better than "free" as in beer.
User avatar
gamma
 
Posts: 178
Joined: Mon Dec 01, 2003 9:16 am
Location: The Netherlands

Postby exomo » Wed Dec 01, 2004 5:44 am

@beer hunter: can't get it (operation time out)

@gamma: very nive code. although I think it doesn't do what it should. & and # instead of X and O and you don't clear the screen. You're dismissed *gg*.
NO, just making fun.
Who needs a signature anyway.
User avatar
exomo
 
Posts: 935
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Postby gamma » Wed Dec 01, 2004 5:49 am

exomo wrote:@gamma: very nive code. ... and you don't clear the screen.
system("cls") on unix? Eeep! Skipped that part deliberately 8).
while (true){sleep(28800);work(57600);}
"Free" as in speech is so much better than "free" as in beer.
User avatar
gamma
 
Posts: 178
Joined: Mon Dec 01, 2003 9:16 am
Location: The Netherlands

Postby coolian » Wed Dec 01, 2004 8:05 am

Yeah, I can't seem to view beerhunter's code too.
User avatar
coolian
 
Posts: 1012
Joined: Wed Oct 29, 2003 6:17 pm
Location: USA

Postby Togra » Wed Dec 01, 2004 8:26 am

OMG Gamma, get a job ;)! Even though I generally don't like obfuscated code, this really is hilarious.
Togra
 
Posts: 188
Joined: Wed Jul 28, 2004 8:51 am
Location: NL

Postby gamma » Wed Dec 01, 2004 8:47 am

Togra wrote:OMG Gamma, get a job ;)! Even though I generally don't like obfuscated code, this really is hilarious.

Hilarious? Why? Isn't it obfuscated? Or? I basically don't get you.

And, yes, I will get a job. :(
while (true){sleep(28800);work(57600);}
"Free" as in speech is so much better than "free" as in beer.
User avatar
gamma
 
Posts: 178
Joined: Mon Dec 01, 2003 9:16 am
Location: The Netherlands

Postby Togra » Wed Dec 01, 2004 9:05 am

gamma wrote:Hilarious? Why?

Something with a joke about a sole variable maybe...

gamma wrote:Isn't it obfuscated?

Yet another joke :)! It looks obfuscate-optimized to me!
You get my vote for now, unless Beer Hunter's gets his server running, I'm curious about his entry and others' ofcourse.

With "I generally don't like obfuscated code", I meant I rather code clean and with some purpose (if there is such a thing). Or in other words, I'm just not good at it ;).

Sorry about the misunderstanding and the job-thing, that was not so funny I guess...
Togra
 
Posts: 188
Joined: Wed Jul 28, 2004 8:51 am
Location: NL

Postby exomo » Wed Dec 01, 2004 10:37 am

Anybody know this code?

Code: Select all
#include <stdio.h>
#include <stdlib.h>

unsigned b;
char JOKE[100] = "#&*^(*=@#^*_: &%(#%)(#&#%@&(*: Don't run me on a c-compiler!";

void C(unsigned x)
{
    if(!(b&x))
      if(((b>>10)&(x>>1))==(x>>1)||((b>>10)&(x>>1))==0)
      {
          puts("Win!");
          exit(0);
      }
}

int main(void)
{
    b+=1?1022:puts(JOKE) < 0 ,puts("");
    for(b&=~(0xf<<19);((b>>19)&0xf)<9;b+=(1<<19),((b>>19)&0xf)%3?1:puts("|"))
      printf("|%c",b&(2<<((b>>19)&0xf))?' ':JOKE[(b>>(10+((b>>19)&0xf)))&(022/11)]);
    printf("Player%2d:",b&3/2);
    while (b&1022)
    {
        b&=~(0x1ff<<23);b|=(getchar()<<23);
        if(b&(1<<31)) break;

        if(((b>>23)-'0')>=1&&((b>>23)-'0')<=9&&(b&(1<<((b>>23)-'0'))))
        {
            b^=(b&(1<<((b>>23)-'0')));
            ((b^=1)&1)&&(b|=(0x200<<((b>>23)-'0')));
            C(14);
            C(112);
            C(146);
            C(168);
            C(292);
            C(546);
            C(584);
            C(896);
            puts("");
            for(b&=~(15<<19);((b>>19)&0xf)<9;b+=(1<<19),((b>>19)&0xf)%3?1:puts("|"))
                printf("|%c",b&(2<<((b>>19)&0xf))?' ':JOKE[(b>>(10+((b>>19)&0xf)))&1]);
            printf("Player" "%2d:", b&1);
            continue;
        }
    }
    return 0;
}


Still crazy enough, but a little more readable.
(Sorry for destroying your Art gamma)

EDIT:
and if you want to see mine: here it is

EDIT2:
forgot to mention it doesn't compile on Darobat's computer, but on my own.
Last edited by exomo on Wed Dec 01, 2004 4:35 pm, edited 1 time in total.
Who needs a signature anyway.
User avatar
exomo
 
Posts: 935
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Postby Epison07 » Wed Dec 01, 2004 12:32 pm

Hummm, I may sound stupid, but... What exactly is obfuscated code? When I first read it, I figured it would be like the shortest amount of code to get the job done...but viewing the above code...I am kind of lost. And that whole joke code thingy...totally blew me away.
Someone explain obfuscate, and/or obfuscate-optimized???
Lil lost.

-Ep
This is me with the words on the tip of my tounge,
And my eye through the scope down the barrel of a gun,
Remind me not to ever act this way again.
-Taking Back Sunday
User avatar
Epison07
 
Posts: 131
Joined: Sat Nov 06, 2004 4:59 pm
Location: Indiana, United States

Postby DannyBoy » Wed Dec 01, 2004 1:42 pm

Epison07 wrote:Hummm, I may sound stupid, but... What exactly is obfuscated code? When I first read it, I figured it would be like the shortest amount of code to get the job done...but viewing the above code...I am kind of lost. And that whole joke code thingy...totally blew me away.
Someone explain obfuscate, and/or obfuscate-optimized???
Lil lost.

-Ep
Obfuscated Code
User avatar
DannyBoy
 
Posts: 1160
Joined: Fri Feb 13, 2004 12:56 pm
Location: In the Billiard Room with the Lead Pipe

PreviousNext

Return to Contests

Who is online

Users browsing this forum: Google [Bot] and 0 guests