Computer Science Canada

Dwite 2010-2011

Author:  Dan [ Fri Oct 01, 2010 2:26 am ]
Post subject:  Dwite 2010-2011

The DWITE contest is starting up again for the school year with our
first round taking place on the 27th of October. A full schedule of
upcoming contest dates for the school year can be found on the
dwite.org webpage.

Team leaders may create new teams, add/remove members or sign teams up
for upcoming contests via the TeamCP (http://dwite.org/teamcp).

Feel free to contact me for help with or questions regarding
the registration process.


Have a great school year!

Author:  A.J [ Sun Oct 03, 2010 4:00 pm ]
Post subject:  RE:Dwite 2010-2011

Also, I would like to add that the season is now back to the regular 5 rounds. I believe that this way the transition of the difficulty of the problems will be neither too gradual nor too steep.

Author:  jafar25 [ Sun Oct 03, 2010 11:21 pm ]
Post subject:  Re: Dwite 2010-2011

ALRIGHT!! IM PRACTICING ALL MONTH FOR THIS Exclamation Very Happy last year, i didnt get involved in dwite, so im pretty new to its questions if they're different. hopefully, our team doesnt lose to grade 10s like we did last year at the ECOO Shocked

Author:  A.J [ Mon Oct 04, 2010 7:58 am ]
Post subject:  RE:Dwite 2010-2011

I am glad to hear it. I would say that the best way to practice for this is to take a look at past contests. The questions tend to increase in difficulty as the rounds go by, possibly more so this year.

Author:  Helldemon80 [ Mon Oct 04, 2010 12:59 pm ]
Post subject:  Re: Dwite 2010-2011

jafar25 @ Sun 03 Oct, 2010 11:21 pm wrote:
ALRIGHT!! IM PRACTICING ALL MONTH FOR THIS Exclamation Very Happy last year, i didnt get involved in dwite, so im pretty new to its questions if they're different. hopefully, our team doesnt lose to grade 10s like we did last year at the ECOO Shocked


Aha Yeah let's hope that doesn't happen again Jafar -_-

Author:  Shanethe13 [ Tue Oct 05, 2010 6:25 pm ]
Post subject:  RE:Dwite 2010-2011

I can't wait for this year's contest to start. Last year was my first year, I failed miserably in the first few I entered, and didn't compete until round 4 or so, but by the end I was doing relatively decent, so I'm hoping that upwards trend continues!

I was wondering if anyone had any advice for working through those graph theory problems though. A lot of the time I know the algorithm I need to use to solve it, but I'm just not sure of the best way to implement it in the time given, although I've had some success with adjacency matrices. If anyone could point me towards a good reference on problems like that, I'd owe you one Very Happy

Author:  A.J [ Wed Oct 06, 2010 11:59 am ]
Post subject:  RE:Dwite 2010-2011

Well, a good book to get you started would be "Programming Challenges by Skiena and Revilla". I found a link that contains this book inline actually:
http://www.negrellischool.it/joomla/images/documenti/materiale/informatica/programmingchallenges.pdf

Also, you could take a look at the "Algorithmist", which is an online encyclopedia for algorithms: http://www.algorithmist.com/index.php/Main_Page

Author:  Shanethe13 [ Wed Oct 06, 2010 3:46 pm ]
Post subject:  RE:Dwite 2010-2011

Thank you! I've only briefly glanced at that book so far, but it seems like just the thing I was looking for. The Algorithmist also looks like a great reference, and I've bookmarked that as well.

Author:  saltpro15 [ Fri Oct 15, 2010 11:15 am ]
Post subject:  RE:Dwite 2010-2011

any chance of prizes this year Dan? I'll be on team Awesome Swatcats again, good luck everybody!

Author:  A.J [ Fri Oct 15, 2010 11:38 am ]
Post subject:  RE:Dwite 2010-2011

Well, there weren't prizes last year, but seeing as we've reduced the number of rounds to 5, I am not sure...I guess Dan will be able to answer that question with more certainty.

Author:  Insectoid [ Fri Oct 15, 2010 12:08 pm ]
Post subject:  RE:Dwite 2010-2011

Unfortunately I won't be able to participate this year, because I'm no longer in high school (though if I did I'd still get schooled by the brilliant kids from Woburn and the other high-ranked schools).

Perhaps I can help Dan run it this year. How about it Dan?

Author:  A.J [ Fri Oct 15, 2010 2:37 pm ]
Post subject:  RE:Dwite 2010-2011

Well, my dorm consists of one person from every one of such schools (well, everyone with the exception of me, as my school wasn't that great at CS): Aurick (Vincent Massey), John (Don Mills), Brian (Woburn).

I guess these are the schools that make me want to compete in such contests.

Author:  SS1389 [ Fri Oct 22, 2010 5:18 pm ]
Post subject:  Re: Dwite 2010-2011

Hey guys,

Do you know how to sign for round 1 of the DWITE contest? I already have a team.

Thanks! Very Happy

Author:  A.J [ Fri Oct 22, 2010 6:04 pm ]
Post subject:  RE:Dwite 2010-2011

"High school team leaders may now sign their teams up for contests via the TeamCP."

I believe you can register your team for a contest via the TeamCP link, at "Sign up for a contest".

Author:  ProgrammingFun [ Fri Oct 22, 2010 6:19 pm ]
Post subject:  RE:Dwite 2010-2011

First year trying out for DWITE....
try not to laugh at our attempts....
jafar25, get ready for Grade 10 domination Mr. Green

Author:  antybash [ Fri Oct 22, 2010 6:21 pm ]
Post subject:  Re: Dwite 2010-2011

I understand that the difficulty level in DWITE will have a smoother transition, however would it be at ALL possible if there was more? They may even stay at the same level as the last DWITE for this season. I really liked the format of DWITE last year when there was 7 contests. It gave not only for me, but for everyone in CS club at my school something to look forward to each month!! Also, after CCC and ECOO are said and done, DWITE is just a good way to just 'relax' and and have fun at CS. (Can you tell I really enjoy DWITE?) Very Happy

So maybe if there is interest amongst the regulars of dwite, maybe increase the length of the season?

Author:  DtY [ Fri Oct 22, 2010 9:17 pm ]
Post subject:  RE:Dwite 2010-2011

Out of curiosity, why do programming competitions (in general, and DWITE specifically) always use files for input and output, wouldn't it be easier (both for programming and automated scoring) to use standard input and output?

e; Also, I did DWITE once in Grade ten (school year before last), would my account still be valid? I tried logging in with the passwords I expected to work, but no success. If my account should still be valid, is there any chance you can tell me if there is an account with the name jeffayle?

e; Found my original sign up email, and got the password, never mind, account's working.

Author:  Dan [ Fri Oct 22, 2010 11:50 pm ]
Post subject:  Re: RE:Dwite 2010-2011

DtY @ 22nd October 2010, 9:17 pm wrote:
Out of curiosity, why do programming competitions (in general, and DWITE specifically) always use files for input and output, wouldn't it be easier (both for programming and automated scoring) to use standard input and output?


The judge supports this, however Turing does not have a standard output stream that is easily accessable to the judge. So blame holtsoft.

Acuactaly we have to do some prity crazy stuff just to get the judge to run turing programs in general.


antybash wrote:

So maybe if there is interest amongst the regulars of dwite, maybe increase the length of the season?


Last year the number of students taking the contest after round 5 droped signifactinly, which is why we went back to 5 rounds.

Author:  A.J [ Sat Oct 23, 2010 1:40 am ]
Post subject:  RE:Dwite 2010-2011

@DtY- Chances are your account no longer exists. I would advise you to create a new one anyways.

@antybash- I get what you are saying, as I was the head of the CS club you mentioned and I certainly felt the same way too, but like Dan said the # of people did drop significantly. I guess if more people want this to happen again as the year goes by, then we might see.

Author:  A.J [ Tue Oct 26, 2010 10:43 pm ]
Post subject:  RE:Dwite 2010-2011

Well, tomorrow is our first round.

If for any reason during tomorrow's contest you have any questions regarding the phrasing of a question or anything of that sort, feel free to PM me on my compsci.ca account. I'll be going back to my old high school to supervise during the contest, so I should always be beside my laptop.

Good luck

Author:  Insectoid [ Tue Oct 26, 2010 11:56 pm ]
Post subject:  RE:Dwite 2010-2011

Bah, I'm in class during the contest. Was hoping to see how my old school's doing this year.

Author:  saltpro15 [ Wed Oct 27, 2010 5:26 pm ]
Post subject:  RE:Dwite 2010-2011

all in all, a successful contest I think. Thanks to Dan, Tony and AJ for all the hard work involved with making the problems and running the contest! I think we can post solutions here now...

Author:  Shanethe13 [ Wed Oct 27, 2010 5:41 pm ]
Post subject:  RE:Dwite 2010-2011

Has the site been acting up for anyone else? I submitted a solution to question 5 with about 10 minutes left, and it hadn't been graded by the time the contest ended. Now that the contest is over, I can't even access the site.

Edit: All seems well now.

Author:  Dan [ Wed Oct 27, 2010 5:54 pm ]
Post subject:  RE:Dwite 2010-2011

The EC2 instance we where using was having some issues which caused it to go down for about 10 mintues at the start of the contest and the end of the contest.

The judge was going a bit slow as we hit a last minute bug that only allowed one judge VM to be run at once.

Your submission should now be marked.

Author:  kkskeshava [ Wed Oct 27, 2010 6:01 pm ]
Post subject:  Re: Dwite 2010-2011

hey i am in gr.10, and i was in the DWITE Contest just for fun and see how the questions would turn out.
so over the period of 3 days right brfore the contest i started learning the basics of turing, and when the contest started and my frineds and i were on a team.
Contest comes along, we cant meet up so we each go home and work on the problems from there alone
i answered question 1, but my friend stupidally submitted his answer with 0 marks 2ce, so i couldnt see what mine woulda got,
i was wondering if someone could look over mine and tell me my faults, i would gladly appreciate it
btw, i am still in the process of learning turing so bear with me if i make dumb mistakes
Also i wanted to know how can we make it so that the program reads the DATA1.txt files...
and btw i do not take any com sci class as you can prob see from my work.
I dont understand the part about DATA1.txt and the OUT1.txt part, if someone could explain it to me it would be great!

The question was :
DWITE has traditionally been a high school level contest, so to ensure that no middle schoolers try to sneak in and make older students feel uncomfortable, an age gate is being considered.

The input file DATA1.txt will contain 5 lines, each having 3 integers representing a person's birth date, in a form of DD MM YYYY (separated by spaces).

The output file OUT1.txt will contain 5 lines of output, decisions if the participant is at least 13 years old as of today (27 10 2010) or not. Print old enough or too young depending on the age.

My answer was:

var yyyy, mm, dd : int
put"What is your date of birth, in the form of DD MM YYYY "..
get dd, mm, yyyy
if
mm > 12 % in case someone tries to crash it by entering a bogus number higher than 12 (dec) it will reject it
then put " ERROR you put an invalid month of birth"
elsif
yyyy < 1997 % if year is less than 1997 then obviouly they are old enough.
then put "you are old enough"
elsif
yyyy > 1997 % if the year is more than 1997, it means they are not old enough
then put "you are too young"
elsif
yyyy = 1997 and mm < 10 % if their date of birth is before oct. 1997 they are too young
then put "you are too young"
elsif
yyyy = 1997 and mm > 10 % if their date of birth is after oct. 1997 they are old enough
then put "you are old enough"
elsif
dd > 31 % in case someone tries to crash it by entering a bogus number higher than 31 (31 days in a month) it will reject it
then put "ERROR you put an invalid day of birth"
elsif
yyyy = 1997 and mm = 10 and dd < 27 % if their birth date is before the 27 of oct. 1997 they are too young
then put "you are too young"
else
put "you are old enough" % if it does not match up with any of the others, it means their birthday is in oct 27,28,29,30,31,
% november or dec. of 1997
end if

thx in advance and BTW gratz to A.J and Dan and Tony for making it a success

Author:  A.J [ Wed Oct 27, 2010 6:10 pm ]
Post subject:  RE:Dwite 2010-2011

kkskeshava, we can't really debug your program for you (especially during the actual contest....). Also, if there are enough people wanting solutions to DWITE questions after each contest, I'll probably start making threads detailing the solutions for each question after each contest.

I was under the impression that this contest might have been a bit on the easier side. Seeing as quite a few teams got >= 4 questions right, this might be true. What do you guys think?

Author:  bbqchps [ Wed Oct 27, 2010 6:28 pm ]
Post subject:  RE:Dwite 2010-2011

Sorry if I'm posting in the wrong place.

I was wondering if I could see my second submission for problem 5 on this Dwite.

I thought that I had it correct when I submitted the second time. And just now when I checked my program, it worked for the test cases, so I just want to know what happened.
Thanks.

Author:  Helldemon80 [ Wed Oct 27, 2010 6:29 pm ]
Post subject:  Re: RE:Dwite 2010-2011

A.J @ Wed 27 Oct, 2010 6:10 pm wrote:
kkskeshava, we can't really debug your program for you (especially during the actual contest....). Also, if there are enough people wanting solutions to DWITE questions after each contest, I'll probably start making threads detailing the solutions for each question after each contest.

I was under the impression that this contest might have been a bit on the easier side. Seeing as quite a few teams got >= 4 questions right, this might be true. What do you guys think?


Well...we got 2 full questions right (1 and 2...lol)...i was confused by #4 though, what is a configuration?

Author:  kkskeshava [ Wed Oct 27, 2010 6:32 pm ]
Post subject:  Re: RE:Dwite 2010-2011

A.J @ Wed 27 Oct, 2010 18:10 wrote:
kkskeshava, we can't really debug your program for you (especially during the actual contest....). Also, if there are enough people wanting solutions to DWITE questions after each contest, I'll probably start making threads detailing the solutions for each question after each contest.

I was under the impression that this contest might have been a bit on the easier side. Seeing as quite a few teams got >= 4 questions right, this might be true. What do you guys think?


well, thanks anyways, actually i submitted this like a hour after the contest was closed, (i think) and i asked this because i am new, and would like to know did we need to add anything to it? lik for java you need a bufferreader or something.

Author:  ProgrammingFun [ Wed Oct 27, 2010 6:52 pm ]
Post subject:  Re: RE:Dwite 2010-2011

A.J @ Wed Oct 27, 2010 6:10 pm wrote:
I'll probably start making threads detailing the solutions for each question after each contest.
Yes please...

A.J @ Wed Oct 27, 2010 6:10 pm wrote:
I was under the impression that this contest might have been a bit on the easier side. Seeing as quite a few teams got >= 4 questions right, this might be true. What do you guys think?

It was my first time doing DWITE, my school and I both epically failed. Mr. Green

Author:  A.J [ Wed Oct 27, 2010 6:54 pm ]
Post subject:  RE:Dwite 2010-2011

@bbqchps- You can access your latest submission for any of the 5 questions on dwite.org.

@Helldemon30- Basically the question required you to count the number of triangles whose vertices were made of the given points that strictly included the origin.

@kkskeshava- If the problem you are having is speicific to Java code, I suggest asking your question at the Java forum (there are lots of pro people there Razz)

Author:  bbqchps [ Wed Oct 27, 2010 7:02 pm ]
Post subject:  Re: RE:Dwite 2010-2011

A.J @ Wed Oct 27, 2010 6:54 pm wrote:
@bbqchps- You can access your latest submission for any of the 5 questions on dwite.org.


Are you sure? Because for my second submission, it actually scored less, because of the time bonus. So doesn't it just show my first submission?

Author:  A.J [ Wed Oct 27, 2010 7:11 pm ]
Post subject:  RE:Dwite 2010-2011

Oh, sorry, I didn't notice that your second submission got a lower score. Well, in that case, right click on the question whose submission you want to look at, right click it and copy the link location. Then, when you paste it, you'll notice that before the file name of your program there's a '/0/'. Change this to a 1 (i.e. '/1'), and that should return your second submission.

Author:  bbqchps [ Wed Oct 27, 2010 7:19 pm ]
Post subject:  RE:Dwite 2010-2011

Okay so now, how did I get 1/5?

Author:  A.J [ Wed Oct 27, 2010 7:27 pm ]
Post subject:  RE:Dwite 2010-2011

I'll take a look at it. In the future, for personal inquiries, PM me and I'll help you out (so, your team name, Q#, etc...). Because if everyone started talking about their errors here, then it would just be bad Razz (I mean, I used to do this when I was a competitor too Laughing).

Author:  kkskeshava [ Wed Oct 27, 2010 7:53 pm ]
Post subject:  Re: RE:Dwite 2010-2011

ProgrammingFun @ Wed 27 Oct, 2010 18:52 wrote:
A.J @ Wed Oct 27, 2010 6:10 pm wrote:
I'll probably start making threads detailing the solutions for each question after each contest.
Yes please...

A.J @ Wed Oct 27, 2010 6:10 pm wrote:
I was under the impression that this contest might have been a bit on the easier side. Seeing as quite a few teams got >= 4 questions right, this might be true. What do you guys think?

It was my first time doing DWITE, my school and I both epically failed. Mr. Green
dont worry it was my first time in DWITE, and also my first time actually using a programming program, so i failed pretty bad too.

Author:  Shanethe13 [ Wed Oct 27, 2010 8:00 pm ]
Post subject:  Re: RE:Dwite 2010-2011

A.J @ Wed Oct 27, 2010 6:10 pm wrote:
Also, if there are enough people wanting solutions to DWITE questions after each contest, I'll probably start making threads detailing the solutions for each question after each contest.


Yes please! That would be amazing.

A.J @ Wed Oct 27, 2010 6:10 pm wrote:
I was under the impression that this contest might have been a bit on the easier side. Seeing as quite a few teams got >= 4 questions right, this might be true. What do you guys think?


I thought the questions were nicely made. My school had five teams (as opposed to one last year!), and everyone seemed to have had a great time. The team of beginner programmers was able to get one question right easily, with everyone else getting at least two. Only two teams really understand what was going on in question #4, but that is typically the case from what I've seen.

Author:  A.J [ Wed Oct 27, 2010 8:02 pm ]
Post subject:  RE:Dwite 2010-2011

I guess the only person you should comparing yourself with on these contests is yourself. Seeing as this was the first contest, you have set a benchmark for you to cross on the next one. Its a learning experience, so I encourage you to take a look at other teams' solutions if you haven't solved a question, and continue thinking about the problems just to learn something new.

Author:  Shanethe13 [ Wed Oct 27, 2010 8:07 pm ]
Post subject:  Re: RE:Dwite 2010-2011

A.J @ Wed Oct 27, 2010 8:02 pm wrote:
I guess the only person you should comparing yourself with on these contests is yourself. Seeing as this was the first contest, you have set a benchmark for you to cross on the next one. Its a learning experience, so I encourage you to take a look at other teams' solutions if you haven't solved a question, and continue thinking about the problems just to learn something new.


And I will be. These contests are great that way; the stuff we do in class in unbearably basic, and DWITE and the CCC are a nice challenge. Seems like my biggest goal should be familiarizing myself with the different algorithms for things like pathfinding and graph theory. Given access to the internet those problems aren't too difficult, but off the top of my head I usually implement an algorithm wrong somewhere.

Author:  kkskeshava [ Wed Oct 27, 2010 8:09 pm ]
Post subject:  Re: RE:Dwite 2010-2011

A.J @ Wed 27 Oct, 2010 20:02 wrote:
I guess the only person you should comparing yourself with on these contests is yourself. Seeing as this was the first contest, you have set a benchmark for you to cross on the next one. Its a learning experience, so I encourage you to take a look at other teams' solutions if you haven't solved a question, and continue thinking about the problems just to learn something new.
yup and i thank you for letting us be a part of this learning experiance, now i will have 4 more questions(that i didnt solve) to figure out for the next little while(like 2 weeks lol) i am still learning basic statements for turing, but i will get the hang of it soon tho i hope

Author:  A.J [ Wed Oct 27, 2010 8:28 pm ]
Post subject:  RE:Dwite 2010-2011

@Shanethe13- Yes, therein lies the challenge.
@kkskeshava- No problem, the credit goes to Dan and Tony for having kept with this for years.

Author:  SS1389 [ Tue Nov 30, 2010 4:44 pm ]
Post subject:  Re: Dwite 2010-2011

Just curious, how are the questions for Dwite created and thought of?

Author:  A.J [ Tue Nov 30, 2010 6:11 pm ]
Post subject:  RE:Dwite 2010-2011

Well, the process in which I come up with questions is a bit random. I usually think of concepts that I think are nice to know, and then I think whether it is of an appropriate level for the contest. Whether a concept is 'nice' or not is based on my experience of writing contests.

Author:  SS1389 [ Tue Nov 30, 2010 6:24 pm ]
Post subject:  Re: Dwite 2010-2011

That's a good way to make questions Smile

Author:  A.J [ Tue Nov 30, 2010 9:23 pm ]
Post subject:  RE:Dwite 2010-2011

I suppose. A majority of the questions I come up with, however, I keep in reserve for other contests. Though the occasional question I propose for DWITE.

Author:  SS1389 [ Wed Dec 01, 2010 4:51 pm ]
Post subject:  Re: Dwite 2010-2011

Do you also help write CCC?

Author:  ProgrammingFun [ Wed Dec 01, 2010 5:59 pm ]
Post subject:  Re: Dwite 2010-2011

SS1389 @ Wed Dec 01, 2010 4:51 pm wrote:
Do you also help write CCC?

I believe the CCC is written by the uWaterloo Math and Computer Science Administration...I could be mistaken

Author:  SS1389 [ Wed Dec 01, 2010 6:28 pm ]
Post subject:  Re: Dwite 2010-2011

I think you're right.

Author:  A.J [ Wed Dec 01, 2010 10:55 pm ]
Post subject:  RE:Dwite 2010-2011

Well, that and a few exceptional grad students. So, no, I do not make questions for the CCC. I do, however, intend to get on the committee in the future (hopefully in the next few years).

I am planning on hosting other contests too. More on that another time, perhaps.

Author:  SS1389 [ Tue Dec 07, 2010 10:15 pm ]
Post subject:  Re: Dwite 2010-2011

Hosting more contests? You can maybe work on ones with only one language allowed? And multiple ones of those types of contests...

Author:  bbi5291 [ Tue Dec 07, 2010 11:16 pm ]
Post subject:  Re: Dwite 2010-2011

SS1389 @ Tue Dec 07, 2010 10:15 pm wrote:
Hosting more contests? You can maybe work on ones with only one language allowed? And multiple ones of those types of contests...
What's the point of that? You can't judge a writer's skill effectively if you force him/her to write in an unfamiliar language. Likewise algorithm contests should allow as many languages as possible so that the participant's ability to express algorithms is not unduly constrained. (Giving problems that are trivial in some languages and not others, though, is considered bad form.)

Author:  A.J [ Wed Dec 08, 2010 12:22 am ]
Post subject:  RE:Dwite 2010-2011

I agree with bbi5291. Contests are there to test the participant's algorithmic ability. However, you could be referring to hosting 'challenges', like writing a program in Brainf**k, or Whitespace. If that's the case, I don't really know any such languages, so I'll stick to the algorithmic contests.

Author:  Tony [ Wed Dec 08, 2010 12:51 am ]
Post subject:  Re: RE:Dwite 2010-2011

A.J @ Wed Dec 08, 2010 12:22 am wrote:
I don't really know any such languages

you could still write the questions though Wink

Author:  wtd [ Wed Dec 08, 2010 12:54 am ]
Post subject:  Re: RE:Dwite 2010-2011

Tony @ Wed Dec 08, 2010 1:51 pm wrote:
A.J @ Wed Dec 08, 2010 12:22 am wrote:
I don't really know any such languages

you could still write the questions though Wink


Or learn one of those languages.

Author:  wtd [ Wed Dec 08, 2010 12:54 am ]
Post subject:  Re: RE:Dwite 2010-2011

Tony @ Wed Dec 08, 2010 1:51 pm wrote:
A.J @ Wed Dec 08, 2010 12:22 am wrote:
I don't really know any such languages

you could still write the questions though Wink


Or learn one of those languages.

Author:  A.J [ Wed Dec 08, 2010 9:16 pm ]
Post subject:  RE:Dwite 2010-2011

I suppose I could..

Author:  SS1389 [ Thu Dec 09, 2010 5:28 pm ]
Post subject:  Re: Dwite 2010-2011

Yes! That was what I was getting at.


: