Contest 39: Autograder

Online C++ programming contests.

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

Postby Darobat » Thu Jul 22, 2004 4:46 pm

Why cant the people with lots of expierence get it? I cant, Dante cant, you cant, yet its still "beginner".
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 tougo » Thu Jul 22, 2004 4:55 pm

Well it doesn't seem so difficult... Iam sure I can do it in half an hour if I use .Net ...but when it comes to standard c++ iam completely ignorant (almost) iam sure i can still do it...but with a 1000 tokes at least(now that i know how to count them). :D Well I really look forward for the next contest ...I'll have time to spare time between 25 of june to 5 of August..
tougo
 
Posts: 432
Joined: Sat Oct 04, 2003 9:18 am
Location: Athens / Greece

Postby leas5040 » Thu Jul 22, 2004 9:33 pm

I can't get it to work right, so I withdraw.


Don't give up! I'm not, and I hardly have time to code it, much less know what I'm doing. I'm going to try to teach myself maps this weekend so I can attempt it. You still have until next Wednesday, that's plenty of time.
"Given enough time, man can do anything with a bit of string and some Tinker toys." Bruce Bolden, Senior Instructor at the University of Idaho.
User avatar
leas5040
 
Posts: 1214
Joined: Mon Apr 12, 2004 9:51 pm
Location: Moscow, ID

Postby Dante Shamest » Thu Jul 22, 2004 9:37 pm

I've managed to solve it (thanks to a hint from Ryan).

479 tokens though. :cry:
User avatar
Dante Shamest
Moderator
 
Posts: 3131
Joined: Wed Oct 22, 2003 10:29 pm
Location: Malaysia

Postby Alvaro » Thu Jul 22, 2004 10:17 pm

197...
User avatar
Alvaro
Moderator
 
Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

Postby Kybo Ren » Thu Jul 22, 2004 10:19 pm

I can teach you maps in about 10 seconds. The STL is pretty easy, actually. They won't take long at all.


I got the scores to add up and sort (maps automatically sort :) ) in 196 tokens. I can't get the curve working, though, and I hate school, so I quit. I can share some example code of how to work with maps if you'd like.
Kybo Ren
C++ Beginner
 
Posts: 2049
Joined: Wed Feb 11, 2004 9:28 pm

Postby leas5040 » Fri Jul 23, 2004 12:01 am

197


Wow! Are you sure you can't do any better Alvaro? :P
"Given enough time, man can do anything with a bit of string and some Tinker toys." Bruce Bolden, Senior Instructor at the University of Idaho.
User avatar
leas5040
 
Posts: 1214
Joined: Mon Apr 12, 2004 9:51 pm
Location: Moscow, ID

Postby Syn » Fri Jul 23, 2004 2:57 am

Alvaro wrote:197...
I knew as soon as people started say this is too hard you'd turn up mate :wink:

Still at debugging stage myself, working through the run time errors, yay :?

I was going to try with vectors, but too much R&N required as their new to me. After the comp could someone show me a version that used vectors for my study?

*edit* GRR can't get a working GetInput();!!!!!! Delimiting with just one '\t' for all would have help Ryan! :evil: No worries back to the challenge
Engineering Student : "How does it work?"
Science Student : "Why does it work?"
Arts Student : "Would you like fries with that?"
User avatar
Syn
 
Posts: 277
Joined: Fri May 14, 2004 3:50 am
Location: Birmingham, UK

Postby TheKidder » Fri Jul 23, 2004 9:48 am

I feel bad, I can't even get it to accept names with spaces... :oops:
w00t!
User avatar
TheKidder
 
Posts: 525
Joined: Mon Nov 24, 2003 7:57 pm
Location: MI

Postby Alvaro » Fri Jul 23, 2004 9:54 am

Roboticguy2 wrote:I feel bad, I can't even get it to accept names with spaces... :oops:

Code: Select all
using namespace std;

string s;
getline(cin,s,'\t');
User avatar
Alvaro
Moderator
 
Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

Postby Darobat » Fri Jul 23, 2004 10:06 am

I don't think that will work Alvaro. Isn't it

Code: Select all
getline(cin, s.c_str(), '\t');
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 Alvaro » Fri Jul 23, 2004 10:13 am

Darobat wrote:I don't think that will work Alvaro. Isn't it

Code: Select all
getline(cin, s.c_str(), '\t');

No.
User avatar
Alvaro
Moderator
 
Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

Postby Darobat » Fri Jul 23, 2004 10:16 am

I guess I shouldn't question someone who made it with only 197 tokens...
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 » Fri Jul 23, 2004 10:22 am

Hey, this is my problem too.
My program works quite well when I read the input from a file, but I have no clue how I can get a whole line of input including spaces and tabs. I didn't do many console applications so never came across this problem.
Could anyone help me? Or is this the point of the contest?? I'd really like to participate but I can't if I don't know how to get the input.
User avatar
exomo
 
Posts: 894
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Postby Alvaro » Fri Jul 23, 2004 10:55 am

Darobat wrote:I guess I shouldn't question someone who made it with only 197 tokens...

Actually, I found a problem with that version and I have to re-work it. So my final count might be a little higher.

You should question me or anybody else, but it is a good idea to do it after you have tried if what I said actually works.
User avatar
Alvaro
Moderator
 
Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

PreviousNext

Return to Contests

Who is online

Users browsing this forum: No registered users and 0 guests