top | item 1954730

Did Pascal beat C++ at the 2010 International Olympiad in Informatics?

34 points| smharris65 | 15 years ago |wired.com | reply

25 comments

order
[+] scott_s|15 years ago|reply
The question of programming languages used is one of the least interesting things in that article.
[+] smharris65|15 years ago|reply
Maybe for some, but for me I was very surprised that the top contestant would use Pascal and do so well. And when the journalist specifically lists total lines of code in his article and makes it a point to differentiate the programming languages of the two contestants it was very interesting to me.
[+] xyzzyz|15 years ago|reply
I know personally some of the IOI gold medalists, and, as far as I can tell, they all use C++, though not all of them like it -- it is just that C++ has STL with set, heap and map, while C and Pascal do not. It is just time saver.

I once knew one crazy guy, who in his free time practiced implementing algorithms and data structures commonly used in such contests (e.g. AVL trees, Dijkstra, KMP), just to waste less time writing them down.

[+] Locke1689|15 years ago|reply
We all do that. Precious time is lost when you have to "figure out" how to write Dijkstra's in Java/C++. Technically, the ICPC allows you to bring a print out, but other competitions do not.
[+] Starmonkey|15 years ago|reply
Just read the article today, which really had nothing to do with language wars, and everything to do with some really smart kids. I commend all the participants in these contests, and am a bit jealous of their skills.

I also really didn't like Kolstad's comment about "will he die a virgin." It reeked of extremely petty jealousy, and was just crass.

[+] kleiba|15 years ago|reply
There are many disciplines in which many people have become known for their dedication and commitment: sports. art. music. People who are successful one of these fields are treated with reverence and respect for their attainment, and rightfully so. Yet I fear that hackers will forever stay the group where enthusiasm, talent and determination is met with stereotypical comments like this:

> “He was ahead for 98 percent of the competition. The question is,” Kolstad says slowly and with utter gravity, “will he die a virgin?”

[+] zck|15 years ago|reply
And that was said by the US coach. He should know better.
[+] zbanks|15 years ago|reply
This doesn't really translate to anything in the real world.

If the goal is to write code quickly, Pascal does beat C & C++. But there are tons of other languages that aren't available.

[+] xentronium|15 years ago|reply
Choice of programming language doesn't matter much in competitive programming.

Say, Pascal (or sometimes Delphi dialect of it) is historically very popular in Russia / Belarus, it's still a primary language in schools.

However, lots of student teams participating in ACM ICPC moved to Java just because it has more data structures in its standard library and it can handle bignums out of the box, meaning you have more time to think about solutions instead of coding long division.

[+] Jach|15 years ago|reply
I did a much easier one of these sponsored by a state university with a team in high school when I was learning Java, it was fun. Though it's ridiculous that they should limit programming language choice so; it's not like it's hard to automate compilation/interpreting and diffing even with different compilers/interpreters. Are people worried that Python may have an "import problemsolution" available? Guess you should make the problems harder... (Yes, they can't support everything, but they should at least support a substantial fraction of languages on say http://projecteuler.net/index.php?section=statistics )
[+] mzl|15 years ago|reply
Actually, it is kind of hard to make a secure solution that takes arbitrary submitted source code, compiles it, runs it, and finally times it with high precision. Sandboxing in a VM is unfortunately not feasible since timing is very hard to do.

And as for the question if this is a legitimate paranoia: yes it is. Many contestants are very smart, and there have been hacks and security breaches in high-profile contests.

[+] kuzux|15 years ago|reply
The real problem is, the time limit for most questions is 1 second, and pretty much all of managed environments take significant times to start, so they're out. But why ocaml or haskell aren't available, i don't know
[+] hugh3|15 years ago|reply
I don't know, did it? Why ask the question in the headline instead of answering it?
[+] coliveira|15 years ago|reply
This is one of the things I dislike most about this forum: people want to attract attention to their articles by changing titles.

The original title "Teen Mathletes Do Battle at Algorithm Olympics" is not much better, but at least describes correctly the subject.

[+] brisance|15 years ago|reply
Wu's solution for the Cluedo puzzle seems inefficient. Could've saved an array assignment by doing mur[] and wep[] at the same time since they are of the same length.

Also, there might be a bug in Wu's solution. It seems the first time through the while loop, the parameters for the Theory function are off by 1. i.e. m=6, l=10, w=6.

[+] woan|15 years ago|reply
It's awesome seeing Rob Kolstad as the US coach. Some of remember him sponsoring the Junior Programming League for high school Plato accounts at the University of IL in the early mid-80s.
[+] v21|15 years ago|reply
I kept bumming myself out reading the article by automatically going on and reading the answer to the problems.
[+] vgurgov|15 years ago|reply
sweet... reminds me days when i spend hours practicing simple algorithms on pascal. I bet very few ppl could type something like "for i:=1 to n do begin end;" faster back in that time...
[+] radioactive21|15 years ago|reply
You know it's something with math, when almost everyone in the picture is Asian.