Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Round 2 Question 2
Index -> CompSci.ca, Contests -> DWITE
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
crossley7




PostPosted: Wed Nov 30, 2011 10:20 pm   Post subject: RE:DWITE Round #2 Question #5

I ended up getting 1/5 after BS'ing something together when I lost my train of thought for what to do with 45 mins left. Had an idea for a solution but I believe it would have timed out anyway with a large test case.

But I have a question about #2. I got 4/5 during the contest, but when I ran it against the given test data it came out exactly like the posted correct answers. Could you look into this? The team name is "Better than Drew and Paul" I would at least like to know which test case it said that I had got wrong originally. When I checked the output it said it ran fine and it ran perfect here. Also, no code changes between submissions and testing.

EDIT: So after looking at the actual solution, I guess I had the right idea for the solution but I wasn't going to construct it properly at all.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Nov 30, 2011 11:07 pm   Post subject: RE:Round 2 Question 2

I've split out your post from another thread, so that the questions don't get mixed up.

Your solution was correct, but you've ended up printing capital Xs instead of lowercase x.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
crossley7




PostPosted: Thu Dec 01, 2011 8:09 am   Post subject: RE:Round 2 Question 2

Ok thanks. I figured that was the issue once I looked back at the problem after I instantly resubmitted the exact same solution. Figured that might have been it. Oh well.

Thanks for the response Tony. Great contest
coolgod




PostPosted: Thu Dec 01, 2011 6:43 pm   Post subject: Re: Round 2 Question 2

i think alot of people in my school got low scores for this question because of the space after the 2 numbers during the input. At least that's what they said,
that extra space wasn't mentioned in the contest and it screwed some non token based inputs.
I was also wondering does the second submission for any question have the same input set?
Tony




PostPosted: Thu Dec 01, 2011 6:49 pm   Post subject: RE:Round 2 Question 2

Second submission has the same cases, but in different order.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
crossley7




PostPosted: Thu Dec 01, 2011 7:43 pm   Post subject: RE:Round 2 Question 2

How would an extra space mess things up? Were hey using a getline type function and breaking the string down into integers? I realize some languages require this (python) but even still, after a bit of experience with it, you would think that you would be careful in case there is a space there
coolgod




PostPosted: Thu Dec 01, 2011 7:47 pm   Post subject: Re: Round 2 Question 2

they used read() then .split and . split apparently....
or something like that in python
I used fin>> and grabbed a char at a time, since fin ignores whitespaces, I was safe Very Happy
crossley7




PostPosted: Thu Dec 01, 2011 8:31 pm   Post subject: RE:Round 2 Question 2

I used c++ and just used
in >> int1 >> int2;
It reads in the numbers perfectly fine and I was golden. I know some of my friends used python last year (think they moved to c++ now mostly) but have no idea how they would have split it to get the input. Just know that it cost us a few hours over the course of a few contests when we worked together trying to get input to read properly
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> CompSci.ca, Contests -> DWITE
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: