New Contest Ideas

Online C++ programming contests.

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

Re: New Contest Ideas

Postby gamma » Wed Feb 09, 2005 3:01 am

I'd like a(nother) code brevity contest. This time a bit larger (spoken in token count).

I already have an idea: converting 'normal' (Arabic?) numbers to Roman numbers for ostreams (like with the small Base contest). I already have a header file and a default implementation, the latter to show what is to be expected. Of course, this implementation is rather long. If you like the idea, I'll post it or give it to Darobat.

I had fun with the obfuscation, but it's time for different contests.

I fancy code brevity contests (although I find it tough). I like template-meta-programming contests (I had trouble making even 1 correct source). I like optimize for speed. Now that I come to think of it, I seem to like all programming contest!!! But with variety. I think that is crucial. Timing is, too: once a month at most twice a month, and fixed starting points (like every first Friday in the month orso).

Rodrigo Dias wrote:...or the smallest binary...
Don't like that; it's compiler dependent, even between compilerflags (-O9 vs -O0 in g++ for instance).

Darobat wrote:...count wouldn't be below 200...
It is always easy to have a guideline, but then I think 200 should be the max. For some contest ideas, we can perhaps borrow problems mathschallenge.net.

One more thing about contests: I think that when contest is posted, it should not start for three days orso. This allows the contestents to interact with the designer to overcome ambiguities and stating the problem understandably and perhaps make a design change. A default implementation would come in handy.

Just my two eurocents.
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 Invictus » Wed Feb 09, 2005 3:21 am

As Bugdude said... obfuscate code all looks the same. Also, no one really takes the time to run or examine the code for quality. They just vote for whatever looks the coolest wich isn't the best thing to do.

I think......... a good contest would be to submit any program that solves a problem. Then people vote on wich programs are the most usefull, creative etc...
User avatar
Invictus
 
Posts: 3054
Joined: Tue Oct 21, 2003 12:59 pm

Re: New Contest Ideas

Postby Togra » Thu Aug 11, 2005 8:57 am

gamma wrote:I'd like a(nother) code brevity contest. This time a bit larger (spoken in token count).

Yeah, me too! Ideas anyone?
Togra
 
Posts: 188
Joined: Wed Jul 28, 2004 8:51 am
Location: NL

Re: New Contest Ideas

Postby Darryl » Thu Aug 11, 2005 9:31 am

Togra wrote:
gamma wrote:I'd like a(nother) code brevity contest. This time a bit larger (spoken in token count).

Yeah, me too! Ideas anyone?


Yea I have an idea

Given 2 strings that repesent 7 playing cards each, provide:
1. The 5 cards of the 7 that represent the best poker hand
2. The rank of that hand ie. flush, 2 pair, high card etc.
3. Which hand wins

ex:
string1 = "ah kh qh jh 10h 10d 10s";
string2 = "5d 5c 5s 5h 2s 2h 2c";

1. best hand for string 1 is "ah kh qh jh 10h"
best hand for string 2 is "5d 5c 5s 5h 2s"

2. string1 has Royal Flush
string2 has four of a kind

3. string1 beats string2
User avatar
Darryl
 
Posts: 1342
Joined: Wed Sep 01, 2004 10:50 am
Location: Cayman Islands

Postby Darryl » Fri Aug 12, 2005 8:28 am

OK, was thinking about this overnight some more. I think my suggestion could be simplified to this:

Given a file with 2 hands per line and unknown number of lines
for each line output the five cards that make up the winning poker hand

Ex.
input.txt wrote:ah kh qh jh 10h 10d 10s 5d 5c 5s 5h 2s 2h 2c
qh qs kd kc 3h 5h 7h 3s 5d 9c 10s ks ah ad


output wrote:ah kh qh jh 10h
qh qs kd kc 7h
User avatar
Darryl
 
Posts: 1342
Joined: Wed Sep 01, 2004 10:50 am
Location: Cayman Islands

Postby Togra » Fri Aug 12, 2005 8:39 am

Interesting idea, Darryl: a tedious task, easy to program but difficult to make it short.
It reminds me of MathsChallenge 54... You haven't solved that problem, right :)? But you have been inactive for a while, so I won't accuse you of cheating ;).

Yeah, I'm in for this idea. Maybe our host Darryl can define the rules and start the contest?
Togra
 
Posts: 188
Joined: Wed Jul 28, 2004 8:51 am
Location: NL

Postby Darryl » Fri Aug 12, 2005 9:29 am

No I havn't solved it, I didn't realize it was even there, I have been inactive on mathschalenge lately. Plus I always skipped the ones that took their input from a file (being lazy)

I think the big difference with this one though is that 7 cards will add a little more difficulty to it.

I have no problem hosting the contest, but I don't have access to start a new thread in the Contest Forum. Maybe one of the moderators can start it for me and I'll take over from there
User avatar
Darryl
 
Posts: 1342
Joined: Wed Sep 01, 2004 10:50 am
Location: Cayman Islands

Postby Corsix » Fri Aug 12, 2005 1:00 pm

Start it in OD and a mod will move it.
Code: Select all
#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}
User avatar
Corsix
 
Posts: 1181
Joined: Fri Jul 23, 2004 9:33 am
Location: Berkeley, UK

Postby exomo » Mon Aug 15, 2005 5:25 am

Yeah a new contest on brevity.
I'm in, too. :clap:
Who needs a signature anyway.
User avatar
exomo
 
Posts: 881
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Postby Safari » Thu Sep 01, 2005 12:47 pm

Why not make a team and battle against other C++/C forums :P

LOL we would beat them..Alvaro, Togra, Gamma all top scorers at mathschallenge
User avatar
Safari
 
Posts: 1362
Joined: Sun Sep 19, 2004 11:07 am

Postby Bugdude » Thu Sep 01, 2005 6:44 pm

Safari wrote:Why not make a team and battle against other C++/C forums :P

LOL we would beat them..Alvaro, Togra, Gamma all top scorers at mathschallenge


We don't need a contest to know we're the best. 8)
User avatar
Bugdude
Moderator
 
Posts: 2480
Joined: Sun Aug 29, 2004 1:58 am
Location: Living in sin

Postby Safari » Fri Sep 02, 2005 1:24 am

Bugdude wrote:
Safari wrote:Why not make a team and battle against other C++/C forums :P

LOL we would beat them..Alvaro, Togra, Gamma all top scorers at mathschallenge


We don't need a contest to know we're the best. 8)

I know! But by competing (and winning) it would be good publicity for this forum :)
User avatar
Safari
 
Posts: 1362
Joined: Sun Sep 19, 2004 11:07 am

Previous

Return to Contests

Who is online

Users browsing this forum: No registered users and 0 guests