Beginners Brevity Contest: BUZZ

Online C++ programming contests.

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

Postby Corsix » Thu Sep 15, 2005 11:01 am

Down to 109.
The code is 'sketchy' but works in MSVC2k3 and dev-c++

edit: actually, probably 110 - damn init() as the constructor
edit2: yarr 110 :(
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 Darryl » Thu Sep 15, 2005 1:00 pm

Corsix wrote:Down to 109.
The code is 'sketchy' but works in MSVC2k3 and dev-c++

edit: actually, probably 110 - damn init() as the constructor
edit2: yarr 110 :(


I am rooting for you now since you made use of last_response (in your face ritz :-P)


btw, I had to do init() as constructor, because it doesn't know total players until after all are created/added.
User avatar
Darryl
 
Posts: 1342
Joined: Wed Sep 01, 2004 10:50 am
Location: Cayman Islands

Postby Safari » Thu Sep 15, 2005 1:24 pm

Could everyone please just add a few comments in their codes? It doesn't take more than 30 sec.
User avatar
Safari
 
Posts: 1362
Joined: Sun Sep 19, 2004 11:07 am

Postby Emery » Thu Sep 15, 2005 1:37 pm

Darryl wrote:in your face ritz
lol

You aren't participating, are you Darryl? After seeing everyone else's entries... O__o
--~~~~
User avatar
Emery
 
Posts: 4313
Joined: Sat Mar 19, 2005 9:16 am

Postby Darryl » Thu Sep 15, 2005 1:41 pm

No I am not in this one
User avatar
Darryl
 
Posts: 1342
Joined: Wed Sep 01, 2004 10:50 am
Location: Cayman Islands

Postby exomo » Thu Sep 15, 2005 2:35 pm

I use the last_response() too. But I'm thinking of a way to remove it and save tokens. I will have some time on the weekend. Now I don't have time (I want to spent on this), but I'm sure I can do better than 159
Who needs a signature anyway.
User avatar
exomo
 
Posts: 879
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Postby Corsix » Thu Sep 15, 2005 3:58 pm

Darryl wrote:I am rooting for you now since you made use of last_response (in your face ritz :-P)
I don't see a way to not use last_response :wtf:
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 jlou » Thu Sep 15, 2005 4:13 pm

You can identify what the correct response will be for the current turn and set up your state to be ready for the next turn.
User avatar
jlou
 
Posts: 760
Joined: Tue Sep 21, 2004 6:42 pm

Postby Corsix » Thu Sep 15, 2005 4:15 pm

jlou wrote:You can identify what the correct response will be for the current turn and set up your state to be ready for the next turn.
Nope; still don't see it. Ah well :roll:
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 Emery » Thu Sep 15, 2005 6:12 pm

How do you know the previous responce will be correct? You can't rely on it.
--~~~~
User avatar
Emery
 
Posts: 4313
Joined: Sat Mar 19, 2005 9:16 am

Postby t i l e x » Thu Sep 15, 2005 6:21 pm

Because the first person to get an answer incorrect will get kicked out and the tests starts at 0.
User avatar
t i l e x
 
Posts: 3604
Joined: Wed Dec 03, 2003 3:59 pm
Location: Québec (Canada)

Postby Darryl » Fri Sep 16, 2005 7:26 am

t i l e x wrote:Because the first person to get an answer incorrect will get kicked out and the tests starts at 0.


Also, the value comes from the framework and not the other players.
User avatar
Darryl
 
Posts: 1342
Joined: Wed Sep 01, 2004 10:50 am
Location: Cayman Islands

Postby Emery » Fri Sep 16, 2005 10:16 am

Was that even mentioned previously? It isn't named last_answer. It's last_responce infering that it is the responce from the person before you. I missed where it said the game would start over if someone screwed up... that doesn't even seem to abide to the real game. If someone screws up in the real game everyone drinks and you keep going. I can't imagine the game starting over each time you drink.... :roll:
--~~~~
User avatar
Emery
 
Posts: 4313
Joined: Sat Mar 19, 2005 9:16 am

Postby Safari » Fri Sep 16, 2005 10:57 am

Are we allowed to create an instance of the framework (buzz) (which is one step ahead of buzz_game) and return the result from my instance to your instance? Then I don't have to do any calculations...lol

Just kidding. :p
User avatar
Safari
 
Posts: 1362
Joined: Sun Sep 19, 2004 11:07 am

Postby Corsix » Fri Sep 16, 2005 11:48 am

[syntax="cpp"]class Corsix_Player : public Alvaro_Player {};[/syntax] ;)
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

PreviousNext

Return to Contests

Who is online

Users browsing this forum: No registered users and 1 guest