
-----------------------------------
bbi5291
Tue Feb 15, 2011 2:02 am

2011 Mock CCC
-----------------------------------
Once again this year we (that is, Woburn alumni) will be hosting a mock CCC contest on our [url=http://www.wcipeg.com/]online judge. The contest will start on Friday at 12:00:00 AM EST and end on Monday at 11:59:59 PM EST, but once you start reading the problems, you will only be able to submit solutions for the next three hours (if any of you have done USACO, it's sorta like that); only your last submission will be graded; you will not know your score until the end of the contest (although you will be able to see whether your submissions successfully compiled). If you want to participate, [url=http://www.wcipeg.com/main/register]register an account here and after the contest has started you may enter it by clicking "contests" on the menu bar and selecting "Mock CCC 2011". Always read from standard input and write to standard output. Unfortunately, Turing cannot be supported, because our judge runs Linux, but C/C++, Pascal, Java, Python, Ruby, Haskell, Perl, and OCaml should all be fine. If you have any questions, I'll be watching this thread during the contest (and you can reach me using the various IM links on my profile).

-----------------------------------
mirhagk
Tue Feb 15, 2011 9:11 am

RE:2011 Mock CCC
-----------------------------------
I'm sorry, but I'm not really sure of the rules for the CCC, what are the rules and stuff, or can you point me in the direction of the link. Also when is the actual contest?

-----------------------------------
bbi5291
Tue Feb 15, 2011 10:43 am

Re: 2011 Mock CCC
-----------------------------------
General rules are found [url=http://cemc.uwaterloo.ca/contests/computing/details.html]here. More specific instructions may be found at the beginning of both the Junior and Senior examination booklets; I don't have one on me but there are scans on the MMHS site (see [url=http://access.mmhs.ca/ccc/2010/juniorproblems2010.pdf]here) for example. The Senior rules differ slightly in that your program is expected to read from a file. (For our mock CCC, always input from the standard input device, like the keyboard, even though it is meant to simulate the Senior difficulty.) There is no memory limit that I know of. The time limits are found in the grading booklet, which your teacher should have available during the contest; on our Judge, the time limits are indicated on the problem description pages, and the memory limit is set to 1 GB (we don't really have much more than that, unfortunately).

-----------------------------------
z_cross_fire
Wed Feb 16, 2011 2:14 am

RE:2011 Mock CCC
-----------------------------------
C#?

-----------------------------------
mirhagk
Wed Feb 16, 2011 8:46 am

RE:2011 Mock CCC
-----------------------------------
That's a good question, because C# is the easiest language to do these sorts of problems in. No fooling around with I/O and conversion, it'll handle it all for you. Since you didn't mention it, I'm assuming you guys don't support it, will the competition support it? And could you guys get it?

EDIT: UGH it isn't supported at stage 2, and it mentions we need to get permission for stage 1 (although I don't assume it will be a problem if something like Turing is allowed)

-----------------------------------
bbi5291
Wed Feb 16, 2011 2:11 pm

Re: RE:2011 Mock CCC
-----------------------------------
That's a good question, because C# is the easiest language to do these sorts of problems in. No fooling around with I/O and conversion, it'll handle it all for you. Since you didn't mention it, I'm assuming you guys don't support it, will the competition support it? And could you guys get it?

EDIT: UGH it isn't supported at stage 2, and it mentions we need to get permission for stage 1 (although I don't assume it will be a problem if something like Turing is allowed)We do our best to minimize the trickiness of the input format. I'm sure you won't have any trouble with it.

We cannot support Microsoft Visual C# because the Judge runs Linux. This is the same reason why Turing is not supported. (It is not, as some people might suspect, because I dislike Turing; after all, I also dislike Java, but I don't really have an excuse for not having Java support.) Would you be interested in seeing GNU Mono added to the list of supported languages?

-----------------------------------
mirhagk
Wed Feb 16, 2011 2:41 pm

RE:2011 Mock CCC
-----------------------------------
Not that it would be trouble, just annoying to have read into a string, then create a function to convert to an int. There probably is a standard library way to do it, but I'm not even sure.

Also I'm confused. Isn't mono .NET except cross Platform, including a C# compiler. So couldn't C# code just be run on a linux using mono, so long as I stay to the default .Net library?

If mono can use C# then yes, I would very much like it. I will use C# for stage 1 of the competition, so I should practice with it here.

-----------------------------------
bbi5291
Wed Feb 16, 2011 3:00 pm

Re: RE:2011 Mock CCC
-----------------------------------
Not that it would be trouble, just annoying to have read into a string, then create a function to convert to an int. There probably is a standard library way to do it, but I'm not even sure.

Also I'm confused. Isn't mono .NET except cross Platform, including a C# compiler. So couldn't C# code just be run on a linux using mono, so long as I stay to the default .Net library?

If mono can use C# then yes, I would very much like it. I will use C# for stage 1 of the competition, so I should practice with it here.I think most languages have direct support for reading integers from standard input. Of the languages currently on the Judge, for example, C, C++, Pascal, Java, and OCaml do, at least, whereas PHP and Perl are weakly typed, so it doesn't matter anyway. I'm sure that C# is not uniquely advanced in its I/O API.

I don't know how Mono works, but I'll get it up and running.

-----------------------------------
mirhagk
Wed Feb 16, 2011 3:02 pm

RE:2011 Mock CCC
-----------------------------------
It's not that it's advanced, it's that it's simple. Especially with the tool tips and auto word completions. I'll spend less time remembering syntax and more time actually programming. And thank you very much, I checked out the site, and it seems to be pretty simple I think, well except for the usual Linux way of installing (tarballs of source code)

Also what do I submit? A source file, or an exe?

-----------------------------------
bbi5291
Thu Feb 17, 2011 12:39 am

Re: 2011 Mock CCC
-----------------------------------
Mono suffers a nervous breakdown when I try to run it in the controlled execution environment (a chroot + random unused user ID). So automatic grading won't be possible for C# --- I can't figure out how to fix the problem.

C# was never intended for console I/O (and neither was VB). I really don't think there is any advantage to using it on this contest, although coding problems in the language is certainly a good way to practice it. So if you want to use C#, submit your programs in C# and I'll grade them manually.

-----------------------------------
mirhagk
Thu Feb 17, 2011 8:04 am

Re: 2011 Mock CCC
-----------------------------------
 So if you want to use C#, submit your programs in C# and I'll grade them manually.


Are you like serious? That is ridiculously nice of you. And the syntax for C# is very clean, and as I mentioned about auto-word completion and tooltips for parameters of a function, it's honestly the fastest language to write code in. It's actually easier to use than Turing. I can use C++ but it's been a while, and whenever I use C++ it takes me a bit to rememeber the order arguments are passed, and what the exact name of the function is.

I mean which syntax is better

[code]
using namespace std;

int main()
{
    char temp;
    cout operators in C++ are far friendlier than the conversions you have to do in C#:
[code]
int main()
{
	int a,b;
	cin >> a >> b;
	cout 