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

Username:   Password: 
 RegisterRegister   
 2011 Mock CCC
Index -> Contests
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bbi5291




PostPosted: Tue Feb 15, 2011 2:02 am   Post subject: 2011 Mock CCC

Once again this year we (that is, Woburn alumni) will be hosting a mock CCC contest on our 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, 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).
Sponsor
Sponsor
Sponsor
sponsor
mirhagk




PostPosted: Tue Feb 15, 2011 9:11 am   Post subject: 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




PostPosted: Tue Feb 15, 2011 10:43 am   Post subject: Re: 2011 Mock CCC

General rules are found 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 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




PostPosted: Wed Feb 16, 2011 2:14 am   Post subject: RE:2011 Mock CCC

C#?
mirhagk




PostPosted: Wed Feb 16, 2011 8:46 am   Post subject: 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




PostPosted: Wed Feb 16, 2011 2:11 pm   Post subject: Re: RE:2011 Mock CCC

mirhagk @ Wed Feb 16, 2011 8:46 am wrote:
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




PostPosted: Wed Feb 16, 2011 2:41 pm   Post subject: 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




PostPosted: Wed Feb 16, 2011 3:00 pm   Post subject: Re: RE:2011 Mock CCC

mirhagk @ Wed Feb 16, 2011 2:41 pm wrote:
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.
Sponsor
Sponsor
Sponsor
sponsor
mirhagk




PostPosted: Wed Feb 16, 2011 3:02 pm   Post subject: 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




PostPosted: Thu Feb 17, 2011 12:39 am   Post subject: 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




PostPosted: Thu Feb 17, 2011 8:04 am   Post subject: Re: 2011 Mock CCC

bbi5291 @ Thu Feb 17, 2011 12:39 am wrote:
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<<"Hello World!"<<endl;
    cin>>temp;
    return 0;
}

or C#'s
code:

static void Main()
{
     Console.WriteLine("Hello world!");
     Console.ReadKey();
}


Some may prefer C++'s syntax, but you have to admit C#'s is definetly the most descriptive. I mean for a n00b, cout and cin are like wtf? Whereas Console.WriteLine explains itself. I'm a huge fan of code that expliains itself, and therefore requires no commenting to understand 100%.
bbi5291




PostPosted: Thu Feb 17, 2011 10:45 am   Post subject: Re: 2011 Mock CCC

mirhagk @ Thu Feb 17, 2011 8:04 am wrote:
bbi5291 @ Thu Feb 17, 2011 12:39 am wrote:
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.
I'm banking on the fact that not many people will want to use it, so it won't take me too long.

Quote:
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.
That's a Visual Studio feature, not a feature of the C# language. I enjoyed the autocompletion and tooltips, too, when I was using Microsoft Visual C++.

Quote:
I mean which syntax is better

code:

using namespace std;

int main()
{
    char temp;
    cout<<"Hello World!"<<endl;
    cin>>temp;
    return 0;
}

or C#'s
code:

static void Main()
{
     Console.WriteLine("Hello world!");
     Console.ReadKey();
}


Some may prefer C++'s syntax, but you have to admit C#'s is definetly the most descriptive. I mean for a n00b, cout and cin are like wtf? Whereas Console.WriteLine explains itself. I'm a huge fan of code that expliains itself, and therefore requires no commenting to understand 100%.
It depends on what you want to focus on. A real n00b might not understand why Main() has to be labelled "static" or what the word "Console" means, but could still infer the behavior of this program from common sense. Likewise, for C++, it's not at all obvious what "cout" means in isolation, but it becomes clear with context.

And I would say that the overloaded << and >> 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 << a+b << endl;
}


code:
public class aplusb
{
        public static void Main()
        {
                int a = int.Parse(System.Console.ReadLine());
                int b = int.Parse(System.Console.ReadLine());
                System.Console.WriteLine((a+b).ToString());
        }
}


But if you want to go for n00b transparency, go for Pascal; it's the language we at Woburn teach to beginners, and the language upon which Turing is based:
code:
begin
        writeln('Hello, world!');
        readkey
end.
mirhagk




PostPosted: Thu Feb 17, 2011 12:20 pm   Post subject: RE:2011 Mock CCC

to be honest I still find C# to be more friendly simply because everything is object oriented. Anything to do with the console is under there.

And VS's C++ has SOME of the stuff that VS's C# but nowhere near as good. Auto complete is only in classes, and syntax highlighting is good, but not AS good.

I'm not saying VS and C# is better, it's just much more natural for me.
bbi5291




PostPosted: Tue Feb 22, 2011 12:11 am   Post subject: Re: 2011 Mock CCC

The contest is over. Preliminiary results can now be viewed by entering the contest and clicking "users" from the menu bar. Analyses and test data can be viewed here. Report any irregularities to me within 24 hours; after that, results will become final.

One competitor failed to adhere to the output format specification for "nospaces" (by, in fact, separating the two integers to be output with a newline). Several competitors forgot to read the Help (README), and either submitted a Java class with a name that did not match the problem code, or attempted to read from an input file on disk (you were supposed to use standard input). Some users also failed to use 64-bit integers where appropriate.

Besides the fact that I had to manually edit some people's code to make it conform to the instructions in the Help (README), the contest ran relatively smoothly, with nobody apparently trying to hack the judge.

I wish you all good luck on DWITE #5 on Wednesday, which will also be a bit like a practice CCC Senior; may יהוה have mercy on your souls. Razz
antybash




PostPosted: Tue Feb 22, 2011 5:16 pm   Post subject: Re: 2011 Mock CCC

Thank you Brian et al. for the contest!! The problems were very interesting and original, I especially enjoyed the Virtuoso question!!

Thanks a bunch!
Display posts from previous:   
   Index -> Contests
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 24 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: