This time the language is Ada, chosen not for being particularly crazy (it's too Pascal-like to my taste) but for its name. Indeed, a language named for Ada Lovelace seems to be a perfect fit for programmers' professional holiday. I tried to balance the lack of language weirdness by problems somewhat less trivial than usual.
Here is the traditional solution for "A+B" problem (integers A and B can be given in one line):
with Ada.Integer_Text_IO;
use Ada.Integer_Text_IO;
procedure AplusB is
A, B: Integer;
begin
Get(Item => A);
Get(Item => B);
Put(Item => A + B, Width => 1);
end AplusB;
The testing system uses gnat 4.7.2. To test your programs before submitting, you can:
- use “Custom test” tab in the contest interface.
- use ideone, language Ada (gnat-4.6). Remember that by default programs submitted by anonymous are shown in “recent codes”; to avoid this I recommend registering and using "private" privacy option or at least use "secret" option.
- install the compiler locally.
If you use Linux, this compiler is present in the repositories (version 4.4.3 for my Kubuntu). After installing the compiler use gnat make file.adb
to compile the code and create the executable. If you have mingw installed, you can run mingw-get install ada
and then compile gnatmake file.adb
.
September 13th will be Friday the 13th, Programmers' Day — this year not only a professional holiday but also a Surprise Language Round!
The rules of the contest are as follows:
- The contest is unrated for everybody.
- The round uses ACM ICPC rules: the standing is defined by the number of solved problems, ties are resolved based on penalty time. Initially the penalty is 0, and for each solved problem it is increased by submission time (since the start of the contest) + 20 minutes for each failed submission. The solution is considered to be correct if it passes all tests from a predefined test set; you know whether the solution is right immediately after sending it. There are no hacks
- The round has 7 problems, sorted by estimated complexity, and you have 2 hours to solve it.
- Solutions are accepted only in one language, which will be announced at the beginning of the contest. The language was created a while ago, we didn't invent it for this occasion.
- Please reread this post at the beginning of the contest: we will announce the language and add instructions to install the compiler (the contest interface will provide an option to run your solutions online as well) and links to useful manuals. Other than that, learning the language is up to the competitor. You can use any resources to solve the problems (as long as you remember that this is an individual competition); you don't have to limit yourself to the manuals provided in the post.
We hope that the language we chose will be unknown to most of the competitors. For reference, here is the list of Surprise/Unknown Language Rounds which took place on Codeforces earlier.
Good luck! And happy Programmers' Day!
How about including this to your blog ? :)
Edit : so what's wrong?
What does it mean it is unrated?
It means that your rating (a number resulting from your participations at different contests that you can see on your profile page and who determine the color of your handle) will not be affected by this contest. And if your true question was "why is it unrated?", I think it's just to not give advantage at the rare coders who are lucky and already know the language (Edit: and because it's a lot different from the others contests).
Congratulation Alimzoo!! Your contribution is getting worse, as you want to! ;) Because of this comment, I guess mine is too, but it was worth to say!
We missed april fool contest... First i thought it'll be like that
hi , im happy for this event . but there's a question in my mind !!? how can we learn the surprise language ? because learning a new language will take time ...
Of course you need time, that's why you're given 2 hours.
The whole point of this type of contest is not just that you have to solve some (fairly simple) problems but that you have to learn as much of a new language as you can while doing this. How you do this is up to you :)
Thanks for answering This contest is a really good idea Because all are the same at the beginning of the contest and that is very interesting . Thanks by ,
We see cobol in surprise language round #5, It's a programming language in BigFrame... The round looks interesting...
Thx for unusual event
Hi and thanks for the contest, Will it be a speed contest or the problems will have some academic loads? Most of the last unknown language contests were speed contest, many participants solved all the problems just in less than an hour! anyway, thanks to Nickolas for this unusual event!
It's the (1<<8)th day of the year! Happy programmers Day to all.
(1<<8) ???
x<<y (Left bit shift in C++. In Pascal it will be x shl y) = x*pow(2,y) => 1<<x = pow(2,x) => 1<<8 = 256;
Today is thirteenth of September, it is the 256th day of the year (Programmers' Day). Didn't you know this?
Reference http://en.wikipedia.org/wiki/Programmers'_Day
Unknown Language? Sounds COOL!
How early will the language be announced?
Let's play guess which langue is gonna be.
My guess (although it's a weak one) : Brainf*ck
Maybe LOLCODE :)
I'm sure it will be one of those at Nickolas' website Progopedia. So let's choose one lng,learn it and know who was lucky. What do you think? :)
http://codeforces.me/blog/entry/7216?locale=en Problem C
Yes, I know :)
"We hope that the language we chose will be unknown to most of the competitors."
Doubt it's going to be Brainf**k :) Also, God forbids Malbolge from appearing, ever. My guess would be FRACTRAN.
I know, you're not the only one who can read, it's why i said it's a weak guess, god forbid you people not downvote someone's opinion which differs from yours.
Tip: I didn't downvote your comment.
Is there a compiler for Linux? Give instructions how to install it.
when will the announce is attach?
When the language will be announced ???
Waiting... :(
"Please reread this post at the beginning of the contest"
It's Friday the 13th. What could possibly go wrong? ... ;)
"The round has 6 problems"
I just knew that there are 6 elements in {A, B, C, D, E, F, G}.
I felt that announcing 6 problems and giving 7 feels like a nice surprise and much better than the other way around :-)
"...and links to useful manuals". Can't see them!!!
The language is so hard! Especially when you have not material!
http://www.infres.enst.fr/~pautet/Ada95/a95list.htm
This is a much more interesting resource than wiki, wiki just assumes you already know how to put everything together to make some sense.
"I tried to balance the lack of language weirdness by problems somewhat less trivial than usual."
Probably it was necessary, but I wanted something simpler for problem A (like "given an integer n, output n*(n+1)/2").
Ada is a bit unusual, but too Pascal-like for ULR, as I think. Almost everything is supported (calendar, maps and sorting, dynamic arrays), no fastidious code is required for easy things (the only problem I had is with Get/Get_Line and newline characters). I liked COBOL more.
However, noone execept me got more than four problems :) and it looks like the round was very and very fun for the rest of community. I swear it was the first time I saw Ada.
Thank you, Nickolas!
I'm very impressed with your performance — and thank you for making each problem solveable during the contest :-)
Thank you for yet another wonderful surprise language contest!
Quite a fun round :-) Makes you appreciate the languages you actually work in :-) Please have another secret round match soon! :-)
Number of programming languages is limited, it's better not to conduct such competitions too often :)
Thank You For Your Wonderful Contest...
I think there is an error in judge system for me...
Link
When I use custom test in Test #5 i get output the 0.23478 and right answer ...
Please take a look at this ...
Your code produces 0.23191 where the correct output is 0.23478. Change the line
to this:
and your code will be accepted.
I think in this case 'range will return 100 (allocated size) instead of the actual string length. So the rest of the string will be filled with garbage (no end-of-line in fixed-length strings), and the result of the prorgam depends on whether there will be 0, 1 or ? in this garbage. The output varies between runs depending on the contents of the memory — you just were unlucky to get the contents with one of these symbols.
Thanks for reply Dear Nickolas.
Yes it caused by me. I should find the string length or initialize first :) to avoid occurrence of this. My resubmission may cause another w/a somewhere else.
But I believed ADA miracle today. Several outputs for single code and input ;)
You don't even need to look for it too hard — Get_Line (Str, Last); puts line length in Last. But I'm pretty sure you can achieve the same result without using such exotic tools as Ada — for example, use char[100] in C++ without checking for end-of-string character :-)
It cost me too much time to learn basic syntax in wrong way (reading tutorials and documentations instead of cloning examples).
Also forcing myself to fight against notepad and Custom Test makes this round funnier :D
A bad language! :-&
Want more of this kind of contests!
Really enjoyed this round!! Thanks a lot!
BTW, if you also liked Ada, you can solve problems at SPOJ, which has Ada compiler. :)