Unobfuscated code contest #1

Online C++ programming contests.

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

Postby Darobat » Mon Oct 25, 2004 9:14 pm

Thats just more work than I'm willing to do. It's hard enough since it isn't nescesarily going to be convex, but this just pushes it. I'm out unless I suddenly get an idea.
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 Invictus » Mon Oct 25, 2004 9:41 pm

Darobat wrote:Well thats even more confusing... :?


I don't get it either... seems stupid and pointless can you PLEASE change the coordinate to 0,0 and make the whole thing alot less confusing?

And add to the contest, "No sharing your ideas or techniques." so that people don't help eachother. And maybe you cannot ask questions about the contest on the forum or you are disqualified.
User avatar
Invictus
 
Posts: 3054
Joined: Tue Oct 21, 2003 12:59 pm

Postby Beer Hunter » Tue Oct 26, 2004 1:38 am

Hopefully this image will explain my coordinate system a bit better. I'll add it to the original post.

I'll also split it into three divisions for you slackers who can't figure out how to deal with difficult polygons. ;-)
User avatar
Beer Hunter
 
Posts: 912
Joined: Sat Dec 13, 2003 7:12 pm
Location: Australia

Postby Invictus » Tue Oct 26, 2004 1:43 am

I dont understand how you could do the wrong diagram? It is a console app and you cannot change where the characters are drawn.

Will an output like this surfice?
Code: Select all

|\
|%\
|%%\
|%%%\
|%%%%\
------------




oh, ok I get it...
The coordinates (0, 5) refer to a point exactly halfway across the first column and exactly halfway down the sixth row in the console. The coordinates will not extend beyond column #70 or row #20.


Dude, I don't think 20 rows is enough. Better make it 40.

The default console is acctually 80 characters width and 25 characters height. So maybe those are better dimentions?

I acctually already wrote mine to rely on:
Code: Select all
#define SCREEN_WIDTH 80
#define SCREEN_HEIGHT 25
User avatar
Invictus
 
Posts: 3054
Joined: Tue Oct 21, 2003 12:59 pm

Postby Beer Hunter » Tue Oct 26, 2004 2:27 am

Cold Flame wrote:It is a console app and you cannot change where the characters are drawn.
No, but you can change what characters are drawn. See here for an example. You might notice some distortion on the bottom edge towards the left — this is perfectly acceptable..
Cold Flame wrote:Dude, I don't think 20 rows is enough. Better make it 40.

The default console is acctually 80 characters width and 25 characters height. So maybe those are better dimentions?
They'll be large enough for the test data that I'll be using. I chose 70 and 20 to make it clear that people wouldn't have to worry about exceeding the default console dimensions. I could make it 79 and 24, but I like round numbers.
User avatar
Beer Hunter
 
Posts: 912
Joined: Sat Dec 13, 2003 7:12 pm
Location: Australia

Postby Invictus » Tue Oct 26, 2004 3:56 am

The tough part is filling the triangle convex and concave... I am so stumped...
User avatar
Invictus
 
Posts: 3054
Joined: Tue Oct 21, 2003 12:59 pm

Postby Beer Hunter » Tue Oct 26, 2004 4:37 am

Well, I could have given you a hint, but you did ask that I disallow people from giving such advice. ;-)
You can still enter the easy division (check my changes to the original post).
User avatar
Beer Hunter
 
Posts: 912
Joined: Sat Dec 13, 2003 7:12 pm
Location: Australia

Postby Invictus » Tue Oct 26, 2004 6:33 am

Beer Hunter wrote:Well, I could have given you a hint, but you did ask that I disallow people from giving such advice. ;-)
You can still enter the easy division (check my changes to the original post).


Thats ok, I got it. ;)
User avatar
Invictus
 
Posts: 3054
Joined: Tue Oct 21, 2003 12:59 pm

Postby Darobat » Tue Oct 26, 2004 4:08 pm

Can I change the name of the classes/functions? I like to use different naming conventions...
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 MXP » Tue Oct 26, 2004 6:37 pm

If the tests are automated then how do you expect your code to compile?
Need information on a function I've posted? Chances are it's at the MSDN.
MXP
 
Posts: 6506
Joined: Mon Sep 22, 2003 5:27 pm

Postby Invictus » Tue Oct 26, 2004 8:06 pm

Here is my current progress:
Image
User avatar
Invictus
 
Posts: 3054
Joined: Tue Oct 21, 2003 12:59 pm

Postby Invictus » Wed Oct 27, 2004 2:34 am

How is this? Still haven't gotten it filled. =(
User avatar
Invictus
 
Posts: 3054
Joined: Tue Oct 21, 2003 12:59 pm

Postby Beer Hunter » Wed Oct 27, 2004 3:07 am

Looking good. Fill it and you'll be ready to submit. :)
User avatar
Beer Hunter
 
Posts: 912
Joined: Sat Dec 13, 2003 7:12 pm
Location: Australia

Postby Beer Hunter » Wed Nov 03, 2004 4:50 pm

The deadline approaches. Send me your entries via PM or to defenestrator@gmail.com.
User avatar
Beer Hunter
 
Posts: 912
Joined: Sat Dec 13, 2003 7:12 pm
Location: Australia

:-(

Postby Dudi Hatotah » Wed Nov 03, 2004 9:30 pm

I didn't know about the contest since I don't visit the Open Discussion forum...
I would have joined... :cry:

It should have been on the contests forum... :(

Oh well... I'll try to find out and join the next unobfuscated contest...
User avatar
Dudi Hatotah
 
Posts: 222
Joined: Fri Oct 03, 2003 4:17 pm
Location: Micronesia, the island of Yap

PreviousNext

Return to Contests

Who is online

Users browsing this forum: No registered users and 0 guests