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.
Full text and comments »