Computer Science Canada

Here we go, CCC2010 discussion zone!

Author:  jimjim168 [ Tue Feb 23, 2010 5:31 am ]
Post subject:  Here we go, CCC2010 discussion zone!

Yeah, tomorrow in Beijing,China, we are going to have CCC2010! What a great thing!
So here, anything about CCC is welcome!
Here we go! Cheers~ Very Happy


---
P.S. something that we ought not to forget!
1. Close the file before the program exits. Or you would get no points.
2. Initalize the variables before using them. Very important.
3. Save your code as the competition goes on.
4. Double-check the name of your code, and the input file name as well.
5. Stay calm during the competition.
6. Eat some chocolates before the competition to get enough power. Your brain will be burning in the next three hours.


At last, good luck to you all! You can make it! Very Happy

Author:  Insectoid [ Tue Feb 23, 2010 2:44 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

CCC in china? I thought it was a Canada-only competition.

Author:  Shanethe13 [ Tue Feb 23, 2010 3:48 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Yep, the contest is also offered in China according to the CEMC website.

Anyways, I just finished writing the Junior Contest about an hour ago, and through it went really well. I was able to finish all five problems within an hour and a half or so, so the rest of the time was just spent trying different test cases. I'm pretty confident on 1 - 3, and 5, but the wording for question 4 was a little odd, and I'm not sure if I did what it was asking.

How did everyone else find it?

Author:  cavetroll [ Tue Feb 23, 2010 3:59 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

I finished problems 1,2, and 4 on the senior contest. Unfortunately, I won't get any marks for number 4 because I forgot to remove the profiler when I submitted. I realized about 5 minutes after leaving the contest room.

3 and 5 I had the beginning of a solution for, but ran out of time before I could implement them.

Author:  Insectoid [ Tue Feb 23, 2010 4:01 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

I'd like to mention that no complete or partial solutions or strategies should be posted until the deadline for teachers to send solutions in, as some people potentially have not done the contest yet due to inclement weather or whatever.

Author:  konnetikut [ Tue Feb 23, 2010 4:15 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

I did the senior contest - finished problems 1, 2 and 3. Did not attempt 4 or 5. It's already been marked; I got 45/75.

I know two juniors that got 72 and 75.

Author:  saltpro15 [ Tue Feb 23, 2010 4:35 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

did S1 and S3, got angry, called it a day.

Author:  Insectoid [ Tue Feb 23, 2010 4:40 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Not even S2? That one was easy! Even I got it and I had to half-relearn Ruby!

Author:  saltpro15 [ Tue Feb 23, 2010 4:44 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

ah shut up : P I misread the problem statement, half coded a binary tree, then realized what it was asking.

btw, I thought this year was supposed to be easier? that's the hardest one yet!

Author:  Shah-Cuber [ Tue Feb 23, 2010 4:51 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

Agreed
S1, S2, S3 ... No time for S4 & S5
Who else cried when they read S5?

Author:  Kam [ Tue Feb 23, 2010 5:17 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

This was my first time attempting the senior problems (I've been doing the junior ones for the past two years) and I have to say.. it went pretty horrible for me lmao. S1 and S2 I got but i took way too long in completing them... S3 I had no clue where to start. I understood S4 and attempted to do it.. but I couldn't even get the input working correctly. S5 i looked at first page of the question, then fixed to next page, saw a tree diagram, got intimidated, and then went back to looking at S3 and S4

But I have to say, it was a good three hours.

Author:  chengbin [ Tue Feb 23, 2010 5:52 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

I did the junior contest. I did J1,J2,J3, and a half baked J5.

The first 2 questions was easy, J3 was substantially harder, but still doable without thinking first. I finished the first 3 questions in 45 minutes, and devoted the rest for J4 and J5.

I only know Turing, and we're not even close to finishing everything. I couldn't do J4 because I didn't learn what's needed to do that question.

J5 was brutal, it took almost an hour just to approach this program, how to start, and coming up with an algorithm.

I finally figured it out that calculations can only bring you so far, and when you're a few spaces away you have to manually analyze the positions and come up with all the scenarios. I managed to get a half baked one working for a few spaces, but I took too long analyzing and finding out why some inputs wouldn't work. Even if I had the time I probably wouldn't bother. The code was pretty ugly and I got tired of it.

Author:  Draymire [ Tue Feb 23, 2010 6:30 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

I just did the junior one today, i found it really easy, maybe i should have wrote the senior one. Smile i finished problems 1-4 in about 1 hour and spent the next 2 hours working on problem 5. i had a program that worked for their test cases for problem 5 but not my own test cases. Sad Anyways i think i will play around with the senior competition for fun.

Author:  Shanethe13 [ Tue Feb 23, 2010 6:51 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Seems like it was the opposite with me. I found problem 5 of the junior section to be the easiest, and spent the most time on number 4. Well, easiest as compared to the last three. The first two will obviously be the easiest.

Author:  chengbin [ Tue Feb 23, 2010 7:21 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

Shanethe13 @ Tue Feb 23, 2010 6:51 pm wrote:
Seems like it was the opposite with me. I found problem 5 of the junior section to be the easiest, and spent the most time on number 4. Well, easiest as compared to the last three. The first two will obviously be the easiest.


Really? 3 was pretty darn easy. It just takes a while to code. No thought was required.

But I do agree that 4 was harder than 5.

Author:  Shanethe13 [ Tue Feb 23, 2010 7:33 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Well three itself was really easy, but I found that five was the easiest of the group. It was just basic recursion, whereas number three at least took some string manipulation. I think the biggest issue with four might have been the way it was worded.

Edit: Then again, my main programming language is Haskell, so recursion is second-nature to me Razz

Author:  bbi5291 [ Tue Feb 23, 2010 8:11 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

Preliminary Senior results from my school.
It looks awful without the CSS, but oh well. The chart is still readable.

Author:  Alexmula [ Tue Feb 23, 2010 8:29 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

would anyone mind posting the questions in a couple of days for us university people? Very Happy

Author:  Shanethe13 [ Tue Feb 23, 2010 8:41 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

bbi5291 @ Tue Feb 23, 2010 8:11 pm wrote:
Preliminary Senior results from my school.
It looks awful without the CSS, but oh well. The chart is still readable.


Wow, your school seems to have done really well. There wasn't even a single senior participant at mine Razz

Alexmula wrote:

would anyone mind posting the questions in a couple of days for us university people? D


I think the university posts them on the website within a few days, but if not I'll what I can do.

Author:  chengbin [ Tue Feb 23, 2010 9:35 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

Shanethe13 @ Tue Feb 23, 2010 7:33 pm wrote:
Well three itself was really easy, but I found that five was the easiest of the group. It was just basic recursion, whereas number three at least took some string manipulation. I think the biggest issue with four might have been the way it was worded.

Edit: Then again, my main programming language is Haskell, so recursion is second-nature to me Razz


In turing we have a convenient way to do question 3 without string manipulation (technically a programming error, but used as an advantage for the question). In turing if you don't put a * after a get variable statement, a space in an input will lead to the letters after the space to the next space to be the input for the next get statement.

I didn't learn recursion, so question 5 was unbelievably painful to code.

Author:  DtY [ Tue Feb 23, 2010 9:54 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

chengbin @ Tue Feb 23, 2010 9:35 pm wrote:
In turing we have a convenient way to do question 3 without string manipulation (technically a programming error, but used as an advantage for the question). In turing if you don't put a * after a get variable statement, a space in an input will lead to the letters after the space to the next space to be the input for the next get statement.

I didn't learn recursion, so question 5 was unbelievably painful to code.
I assume this is for the junior test, and that the input was a bunch of numbers separated by spaces.

Turing only reading up to a space isn't a programming error at all, it's actually not uncommon in programming languages to do that, it even has a fancy name I can't remember. I'm not sure what advantages there are to it, but C (scanf) and C++ do that.

Author:  Cyril [ Tue Feb 23, 2010 10:06 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Don Mills CI: John and I got 52. Hard stuff!

Author:  Nori [ Tue Feb 23, 2010 10:39 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

cavetroll @ Tue Feb 23, 2010 3:59 pm wrote:
I finished problems 1,2, and 4 on the senior contest. Unfortunately, I won't get any marks for number 4 because I forgot to remove the profiler when I submitted. I realized about 5 minutes after leaving the contest room.

3 and 5 I had the beginning of a solution for, but ran out of time before I could implement them.


screenie or didnt happen

Author:  Shanethe13 [ Wed Feb 24, 2010 8:25 am ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

Cyril @ Tue Feb 23, 2010 10:06 pm wrote:
Don Mills CI: John and I got 52. Hard stuff!


Awesome! That's a great mark, was this for junior or senior?

Chengbin@ Tue Feb 23, 2010 7:33 pm wrote:
In turing we have a convenient way to do question 3 without string manipulation (technically a programming error, but used as an advantage for the question). In turing if you don't put a * after a get variable statement, a space in an input will lead to the letters after the space to the next space to be the input for the next get statement.


I have no idea why I didn't do it like that. For some reason I never thought of collecting the input separately, and insisted on collecting it all with one statement, then splitting it. Only took an extra line or so, but still. I'm not sure how I, and my friends that wrote it managed to miss that fact Razz A friend of mine completely skipped problem three because he wasn't sure how to collect the input.

Author:  jli1 [ Wed Feb 24, 2010 4:05 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

RAWR my s2 got 12/15 because of an error in the test data/input specs. It says in the input specs that the binary sequence will be less than or equal to 10. Test data #2 had sequences way longer than that. So mine failed it...

If that statement in the specs actually means that the decimal version of the sequence is >= 10, then test data #5 and 6 fail.

...

Author:  Insectoid [ Wed Feb 24, 2010 4:15 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

on my page it said the binary sequence would be no longer than 256.

Anyway, my S1 failed on 3 test cases which consisted of 2 different scenarios I didn't realize could exist. Full marks on S2.

AFTER I had written my string-splitting function in Ruby, I realized it has a command to split a string into an array on whitespace. Damn.

Author:  Shanethe13 [ Wed Feb 24, 2010 4:39 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

insectoid @ Wed Feb 24, 2010 4:15 pm wrote:
AFTER I had written my string-splitting function in Ruby, I realized it has a command to split a string into an array on whitespace. Damn.


The exact same thing happened to me last year.

Author:  jli1 [ Wed Feb 24, 2010 4:52 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

insectoid @ Wed Feb 24, 2010 4:15 pm wrote:
on my page it said the binary sequence would be no longer than 256.


:/ Mine did not say that... It actually said 10. Its the same here: http://access.mmhs.ca/ccc/index.htm (scroll down to the pdf of the contest book).

EDIT: Oh, you might have been thinking about the encoded string to be decoded. I meant the mappings for the characters.

EG:
Valid
2
A 011
B 111
11101111011 etc.

Invalid:
2
A 000000000001
B 0000000000001
0000000000010000000000001 etc.

Author:  konnetikut [ Wed Feb 24, 2010 5:56 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

EDIT: said something that I probably shouldn't have, yet.
When is the deadline for teachers to send marks in?

Author:  Shanethe13 [ Wed Feb 24, 2010 6:31 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

konnetikut @ Wed Feb 24, 2010 5:56 pm wrote:
EDIT: said something that I probably shouldn't have, yet.
When is the deadline for teachers to send marks in?


My teacher said the 18th or so. He isn't in any rush to grade mine Sad

Author:  Insectoid [ Wed Feb 24, 2010 6:53 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Ah, I see now.

Quote:
The next k lines each contain a single character, followed by a space, followed by the binary sequence (of length at most 10) representing the associated code of that character.


However, some of the input files contain as many as 20 digits in the code for a single character. UWaterloo has some explaining to do!

Author:  That Asian Guy [ Wed Feb 24, 2010 7:57 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

does anyone know how the scoring works?

i tested my programs and for J4/J5, only some of the cases worked

Author:  techietim [ Wed Feb 24, 2010 8:01 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

That Asian Guy @ Wed 24 Feb, 2010 8:57 pm wrote:
does anyone know how the scoring works?

Each question is worth a maximum of 15 points, making your total mark out of 75.

Depending on how many test cases there are, you'll get X number of points for correct output on a test case. For example, J4 has 5 test cases, thus making each correct test case worth 3 points.

Author:  That Asian Guy [ Wed Feb 24, 2010 8:04 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

techietim @ Wed Feb 24, 2010 8:01 pm wrote:
That Asian Guy @ Wed 24 Feb, 2010 8:57 pm wrote:
does anyone know how the scoring works?

Each question is worth a maximum of 15 points, making your total mark out of 75.

Depending on how many test cases there are, you'll get X number of points for correct output on a test case. For example, J4 has 5 test cases, thus making each correct test case worth 3 points.


wait but then each test case has multiple parts, what if i all but one of the parts, how do part marks work?

Author:  konnetikut [ Wed Feb 24, 2010 8:20 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

That Asian Guy @ Wed Feb 24, 2010 5:04 pm wrote:
wait but then each test case has multiple parts, what if i all but one of the parts, how do part marks work?


You should probably go ask your teacher.

Author:  Insectoid [ Wed Feb 24, 2010 8:53 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

You get 1 mark for each test case. I don't know if part-marks exist. From what I saw (mine was marked in front of me), it's a right/wrong situation. Perfect output? 1 mark. Small mistake? 0.

Author:  jli1 [ Wed Feb 24, 2010 8:54 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

insectoid @ Wed Feb 24, 2010 6:53 pm wrote:
Ah, I see now.

Quote:
The next k lines each contain a single character, followed by a space, followed by the binary sequence (of length at most 10) representing the associated code of that character.


However, some of the input files contain as many as 20 digits in the code for a single character. UWaterloo has some explaining to do!


Yeah exactly. I'm going to complain to my teacher to get her to complain to the organizers Razz. Its odd they didn't catch such a big mistake...

Author:  That Asian Guy [ Wed Feb 24, 2010 9:10 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

insectoid @ Wed Feb 24, 2010 8:53 pm wrote:
You get 1 mark for each test case. I don't know if part-marks exist. From what I saw (mine was marked in front of me), it's a right/wrong situation. Perfect output? 1 mark. Small mistake? 0.


what about the ones that make you continue until a stop sequence is entered?

Author:  jli1 [ Wed Feb 24, 2010 9:12 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

That Asian Guy @ Wed Feb 24, 2010 9:10 pm wrote:
insectoid @ Wed Feb 24, 2010 8:53 pm wrote:
You get 1 mark for each test case. I don't know if part-marks exist. From what I saw (mine was marked in front of me), it's a right/wrong situation. Perfect output? 1 mark. Small mistake? 0.


what about the ones that make you continue until a stop sequence is entered?


AFAIK most judging uses diff, so its most likely that points are still all or nothing in that case. As for each test case being worth 1 mark, thats incorrect as there are variable numbers of test cases, and yet each problem is still worth 15 marks.

Author:  andrewshen123 [ Wed Feb 24, 2010 9:35 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

So I think I got questions S1-4, but only just got past parsing the input on S5 before running out of time, so I just outputted the hard-coded number 42. Maybe I'll get lucky and get a point or two on it Smile. I don't know when my teacher will be marking it though. I hope to see some of you guys at stage 2, if I get in.

And yeah, if it's like past contests, each test case is worth a different number of points. Also for test cases with multiple parts, I think you need to get them all right to get the points.

Author:  konnetikut [ Wed Feb 24, 2010 9:38 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

andrewshen123 @ Wed Feb 24, 2010 6:35 pm wrote:
so I just outputted the hard-coded number 42. Maybe I'll get lucky and get a point or two on it Smile.


No, you won't? I'm pretty sure Waterloo checks for these.

Author:  Insectoid [ Wed Feb 24, 2010 9:42 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Waterloo will check it, your teacher won't. Marks are based purely on the output; the teacher doesn't even have to look at the code. If you do well and your teacher sends your code in to waterloo, THEN they will check it over.

Author:  That Asian Guy [ Wed Feb 24, 2010 9:49 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

andrewshen123 @ Wed Feb 24, 2010 9:35 pm wrote:
So I think I got questions S1-4, but only just got past parsing the input on S5 before running out of time, so I just outputted the hard-coded number 42. Maybe I'll get lucky and get a point or two on it Smile. I don't know when my teacher will be marking it though. I hope to see some of you guys at stage 2, if I get in.

And yeah, if it's like past contests, each test case is worth a different number of points. Also for test cases with multiple parts, I think you need to get them all right to get the points.


the test cases have been released go check http://access.mmhs.ca/ccc/index.htm Smile

Author:  DtY [ Wed Feb 24, 2010 10:01 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

I thought of a really clever way to parse s5 input in python, that I'll post if I'm allowed to yet.

I'm sure lots of people thought of it though.

Author:  That Asian Guy [ Wed Feb 24, 2010 10:32 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

DtY @ Wed Feb 24, 2010 10:01 pm wrote:
I thought of a really clever way to parse s5 input in python, that I'll post if I'm allowed to yet.

I'm sure lots of people thought of it though.


im pretty sure youre allowed to, since answers for J1-J4 have already been posted in the above link

Author:  Cyril [ Wed Feb 24, 2010 11:09 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

Shanethe13 @ Wed Feb 24, 2010 8:25 am wrote:

Awesome! That's a great mark, was this for junior or senior?


Senior. Hopefully we'll make Stage 2 again, but this is going to cripple our IOI indices...

Author:  jimjim168 [ Thu Feb 25, 2010 4:56 am ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

Hey guys, what do you think of the cutoff for Stage2 this year? And what was it last year?
I really think that some problems this year are kinda hard... I sure have a lot to get improved... Smile

Author:  A.J [ Thu Feb 25, 2010 1:22 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

I believe the cutoff will be around 45~46.

Author:  bbi5291 [ Thu Feb 25, 2010 3:46 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

Cyril @ Wed Feb 24, 2010 11:09 pm wrote:
Shanethe13 @ Wed Feb 24, 2010 8:25 am wrote:

Awesome! That's a great mark, was this for junior or senior?


Senior. Hopefully we'll make Stage 2 again, but this is going to cripple our IOI indices...
Assuming that stage 2 is out of 600, you're only 32 points behind Robin and me, so don't worry about it.

A.J wrote:

I believe the cutoff will be around 45~46.
45 sounds about right to me. But what is the meaning of "~" in this context?

Author:  Shanethe13 [ Thu Feb 25, 2010 4:06 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Got my grade today for junior. Got perfect on 1-3, and 5, but I completely misunderstood what was being asked of me in question 4, so I ended up with about 65/75 or so.

Author:  Draymire [ Thu Feb 25, 2010 4:15 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

i realized while reviewing the question that i messed up j1 bad, and i feel stupid for what i did. i can't wait for my teacher to tell me my mark.

Author:  andrewshen123 [ Thu Feb 25, 2010 4:33 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Results just came in: I got 60/75 on the Senior contest (first 4 problems perfect, no points on the last).

Author:  DtY [ Thu Feb 25, 2010 4:42 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

That Asian Guy @ Wed Feb 24, 2010 10:32 pm wrote:
DtY @ Wed Feb 24, 2010 10:01 pm wrote:
I thought of a really clever way to parse s5 input in python, that I'll post if I'm allowed to yet.

I'm sure lots of people thought of it though.


im pretty sure youre allowed to, since answers for J1-J4 have already been posted in the above link
In that case, input for s5 can be parsed with

Python:
eval(raw_input().replace(" ",","))

Author:  jli1 [ Thu Feb 25, 2010 4:51 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

DtY @ Thu Feb 25, 2010 4:42 pm wrote:
That Asian Guy @ Wed Feb 24, 2010 10:32 pm wrote:
DtY @ Wed Feb 24, 2010 10:01 pm wrote:
I thought of a really clever way to parse s5 input in python, that I'll post if I'm allowed to yet.

I'm sure lots of people thought of it though.


im pretty sure youre allowed to, since answers for J1-J4 have already been posted in the above link
In that case, input for s5 can be parsed with

Python:
eval(raw_input().replace(" ",","))


The one issue is that the input is not consistent. Some test cases use no spaces between the brackets. Others do..... If the input is the first case, it would cause something like (,(5,6),) which is not good.

If I had done junior, I would have hardcoded problem 1, since there are only 10 possible inputs.

Also for people that want to figure out their mark-ish: the test data is here (as mentioned before).

Author:  bbi5291 [ Thu Feb 25, 2010 5:05 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

If anyone does not know their score for the Senior contest yet, you can send me your code and I'll mark it for you.

Author:  That Asian Guy [ Thu Feb 25, 2010 5:09 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

jli1 @ Thu Feb 25, 2010 4:51 pm wrote:
DtY @ Thu Feb 25, 2010 4:42 pm wrote:
That Asian Guy @ Wed Feb 24, 2010 10:32 pm wrote:
DtY @ Wed Feb 24, 2010 10:01 pm wrote:
I thought of a really clever way to parse s5 input in python, that I'll post if I'm allowed to yet.

I'm sure lots of people thought of it though.


im pretty sure youre allowed to, since answers for J1-J4 have already been posted in the above link
In that case, input for s5 can be parsed with

Python:
eval(raw_input().replace(" ",","))


The one issue is that the input is not consistent. Some test cases use no spaces between the brackets. Others do..... If the input is the first case, it would cause something like (,(5,6),) which is not good.

If I had done junior, I would have hardcoded problem 1, since there are only 10 possible inputs.

Also for people that want to figure out their mark-ish: the test data is here (as mentioned before).


or the easy way would be
code:

                int number = int.Parse(Console.ReadLine());
                int count = 0;
               
                for (int i = 0; i <= 5; i++)
                {
                        for (int ii = 0; ii <= 5; ii++)
                        {
                                if (i + ii == number && i >= ii)
                                {
                                        count++;
                                }
                        }
                }
               
                Console.WriteLine(count);

Author:  konnetikut [ Thu Feb 25, 2010 5:12 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Wow, I seriously hope a 45/75 can get me into Stage 2.

On another note, the test cases for S3 bug me a little. It seems that you can assume a non-circular street from 0 to 999999 and still score full marks. There aren't any test cases like, for example:

3
0
500000
999999
2

which would output 1 if the street was circular, 250000 otherwise. My solution also fails some other really simple self-made test cases, but I haven't figured out why yet...

That Asian Guy @ Thu Feb 25, 2010 2:09 pm wrote:

or the easy way would be
code:

                int number = int.Parse(Console.ReadLine());
                int count = 0;
               
                for (int i = 0; i <= 5; i++)
                {
                        for (int ii = 0; ii <= 5; ii++)
                        {
                                if (i + ii == number && i >= ii)
                                {
                                        count++;
                                }
                        }
                }
               
                Console.WriteLine(count);


Or an even easier way would be:
code:

put 3 - abs (5 - n) div 2

from http://access.mmhs.ca/ccc/2010/j12010.txt

Author:  jli1 [ Thu Feb 25, 2010 7:38 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

That Asian Guy @ Thu Feb 25, 2010 2:09 pm wrote:

or the easy way would be
code:

                int number = int.Parse(Console.ReadLine());
                int count = 0;
               
                for (int i = 0; i <= 5; i++)
                {
                        for (int ii = 0; ii <= 5; ii++)
                        {
                                if (i + ii == number && i >= ii)
                                {
                                        count++;
                                }
                        }
                }
               
                Console.WriteLine(count);


konnetikut @ Thu Feb 25, 2010 5:12 pm wrote:

Or an even easier way would be:
code:

put 3 - abs (5 - n) div 2

from http://access.mmhs.ca/ccc/2010/j12010.txt


But those require some level of thinking Razz. Having a switch on the input, with the only possible outputs being 1-3 requires much less thinking.

Author:  DtY [ Thu Feb 25, 2010 7:51 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

jli1 @ Thu Feb 25, 2010 4:51 pm wrote:
DtY @ Thu Feb 25, 2010 4:42 pm wrote:
That Asian Guy @ Wed Feb 24, 2010 10:32 pm wrote:
DtY @ Wed Feb 24, 2010 10:01 pm wrote:
I thought of a really clever way to parse s5 input in python, that I'll post if I'm allowed to yet.

I'm sure lots of people thought of it though.


im pretty sure youre allowed to, since answers for J1-J4 have already been posted in the above link
In that case, input for s5 can be parsed with

Python:
eval(raw_input().replace(" ",","))


The one issue is that the input is not consistent. Some test cases use no spaces between the brackets. Others do..... If the input is the first case, it would cause something like (,(5,6),) which is not good.

If I had done junior, I would have hardcoded problem 1, since there are only 10 possible inputs.

Also for people that want to figure out their mark-ish: the test data is here (as mentioned before).
I need to look at the input specification more closely next time then Sad

In that case, the replacement could have been done with regular expressions, s/(\d+|\)) /,/g , with the proper python functions to do that.

The expression's probably wrong, but it could be done with something like that.

Author:  A.J [ Fri Feb 26, 2010 2:19 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Note that UW asks the teacher to send all scores >= 45...so, if they don't get 20 sent in the first place, the cutoff could potentially be less than 45!

Author:  andrewshen123 [ Fri Feb 26, 2010 5:12 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

I'm not sure about this, but I don't think it's ever happened that there weren't 20 scores over 45. Maybe on one of the harder sets?

Author:  A.J [ Fri Feb 26, 2010 5:39 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

No. Last year's cutoff, I believe it was 49, was the lowest cutoff for any CCC. So, yea, UW asks for scores >= 45, as anything less than that is (virtually) impossible to make stage 2 with. Also, currently I know 8 people with a score >= 45. There are probably 12 other people with such a score, though I believe that a lot of people got stuck at #3 or even #4 and didn't even reach #5. So, yea, the cutoff could be 45, or even (a small possibility) less than 45.

Author:  bbi5291 [ Fri Feb 26, 2010 7:31 pm ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

A.J @ Fri Feb 26, 2010 5:39 pm wrote:
No. Last year's cutoff, I believe it was 49, was the lowest cutoff for any CCC. So, yea, UW asks for scores >= 45, as anything less than that is (virtually) impossible to make stage 2 with. Also, currently I know 8 people with a score >= 45. There are probably 12 other people with such a score, though I believe that a lot of people got stuck at #3 or even #4 and didn't even reach #5. So, yea, the cutoff could be 45, or even (a small possibility) less than 45.
There was one year it was lower, at 47. (I don't remember which, but you can probably figure it out by looking through the problem sets.) And UW asks you to send if the score is >= 40, not >= 45 --- and I'm sure there were 20 scores >= 40.

Author:  A.J [ Sat Feb 27, 2010 10:13 am ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Really? >= 40? Wow, my teacher told me >= 45. So I am assuming that there is a chance that the cutoff is 43 or 44....

Author:  bbi5291 [ Sat Feb 27, 2010 11:23 am ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

A.J @ Sat Feb 27, 2010 10:13 am wrote:
Really? >= 40? Wow, my teacher told me >= 45. So I am assuming that there is a chance that the cutoff is 43 or 44....
You'd better correct your teacher then, if there is anyone at your school with 40 <= score < 45...

Author:  A.J [ Sat Feb 27, 2010 4:34 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Yes, two I think. Or maybe just one (and the score is like 44 or 43....so it would make a difference)

As of now, I know of 9 people with a score of => 45. Looks like this year WAS hard (as these 9 scores include the schools from Canada that have sent people to stage two before...well, mostly all of them).

Author:  A.J [ Tue Mar 02, 2010 7:05 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Wow....this is horrible...

Ok, its the third time in a row something stupid like this happened.

Apparently I forgot to submit my #3 to my CS teacher....as a result, he has the older version of #3 I handed in as opposed to my final copy...

Oh well, I guess if something stupid happens to you three times in a row (Gr 10 - Forgot to save #4, Gr 11 - Teacher didn't mark my #2, and now Gr 12 - Didn't submit #3), then I probably am not meant for Computer Science....

Hmm...maybe if I switch into something else...

To think I got into universities for CS/Math....

Author:  SNIPERDUDE [ Tue Mar 02, 2010 9:03 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Don't worry about it - I'm detail oriented with the memory of a gold fish.

Author:  That Asian Guy [ Fri Mar 05, 2010 4:15 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

i got 51 on the junior

think its enough to make the ranking in their results file they post every year? Razz

Author:  Cyril [ Sat Apr 03, 2010 11:16 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

4/04 CCC results not found...

Author:  bbi5291 [ Sun Apr 04, 2010 11:21 am ]
Post subject:  Re: RE:Here we go, CCC2010 discussion zone!

Cyril @ Sat Apr 03, 2010 11:16 pm wrote:
4/04 CCC results not found...
On a more serious note, stage 2 invitations come out mid-April, and I don't think the results PDF comes out until after then...

Author:  A.J [ Sun Apr 04, 2010 11:50 am ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

please dont talk about CCC...please. I sort of came to peace with that issue already...

Author:  Cyril [ Sun Apr 04, 2010 12:22 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

The brochure says that "Stage 1 results will be posted by April 2".

Author:  techietim [ Sun Apr 04, 2010 7:53 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

Results just came out:

Stage 1 Results
Stage 1 Regional Winners (I'm in there for Jr.)
Stage 2 Invitees

Author:  saltpro15 [ Sun Apr 04, 2010 9:11 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

not even an honourable mention, I FAILED Sad

oh well, there's still ECOO at least...

Author:  Cyril [ Mon Apr 05, 2010 12:09 am ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Yay! I have a few things to say to invitees who are lurking here (I know you're there).

My school's concert is during that week, so I'll bring my alto sax to practice with. If you play an instrument, please bring it, so we can play together. I can also offer to bring a (piano) keyboard.

Those who were there last year might remember my affliction for food. If I had poisoned my beef jerky, Brian would have been knocked out cold! I will probably bring enough to feed a small country- or, equivalently, two dozen programmers.

Last time, I emphasized that we needed more Gamecube controllers. Will bring.

If you're a cuber, bring cubes.

And don't practice pool at all, so we all look equally ridiculous.

Good luck to all, and let's have fun!

Author:  bbi5291 [ Mon Apr 05, 2010 10:00 am ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

41... lowest cutoff in CCC history.
Congrats to Jacob, who was first in Canada with a score of 72. Assuming stage 2 is out of 600, he's 48 points --- half a problem --- ahead of everyone else (the next highest score is 60).
Also, it looks like there is actually a girl invited this year... wow.

Author:  McKenzie [ Mon Apr 05, 2010 1:07 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Interesting. There are six schools sending more than one candidate. Last year there were only three and I think that is more typical. If there is only one student at the school it may or may not be a strong program but when there is more than one odds are it's something that is happening at the school that fosters excellence.

Author:  andrewshen123 [ Mon Apr 05, 2010 2:36 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

Does anyone know how the week 1 AP tests are supposed to fit in with stage 2?

Author:  bbi5291 [ Mon Apr 05, 2010 3:42 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

According to Ali (who missed stage 2 due to IB exams last year), Troy will let you write stage 2 from your school if it is really necessary. Obviously the best thing to do at this point is to contact Troy as soon as possible.

Author:  konnetikut [ Tue Apr 06, 2010 8:17 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

opt to take Form B for AP exam conflicts.
http://professionals.collegeboard.com/testing/ap/coordinate/late
You might have to pay a $40 fee /exam..

also, Chris Robart of MMHS has posted his solutions, and is looking for a working S5 answer, in case if anybody hadn't noticed already.
http://access.mmhs.ca/ccc/

Author:  bbi5291 [ Tue Apr 06, 2010 9:19 pm ]
Post subject:  Re: Here we go, CCC2010 discussion zone!

I'll code it up tomorrow if I'm not too lazy... my original solution only memoized vertices (not edges), so it was excessively slow and not suitable for demonstration

Author:  That Asian Guy [ Wed Apr 07, 2010 3:23 pm ]
Post subject:  RE:Here we go, CCC2010 discussion zone!

yes!!

51 got me a group 3 ranking

im in grade 12 but i did the junior so i could be mentioned Razz

i guess thats reasonable considering i didnt take ics 4u1


: