The round is over; I hope you enjoyed it. Here is the editorial.
The language of this round is Befunge, a lovely two-dimensional esoteric language. It's quite neat and convenient, especially for an esoteric language. Thus, for example, "A+B" problem, where A and B are given in separate lines, can be solved like this:
&&+.@
To learn the language you can read the original documentation (the rumor is that it is broken in some browsers), examples of programs at Rosetta Code and Progopedia article with annotated examples.
Our testing system uses befungee interpreter, which implements Befunge-93 dialect. To run the interpreter, one needs to have Python installed (version 2.6 or so, but not 3.*). Download files befungee.py, boards.py
and funge.py
to the directory with your programs and run the interpreter with python befungee.py <Befunge program name>
command. Note the built-in debugger (run with --debug --delay=100
option) which allows to watch the movement of instruction pointer through the program and the effect it has on the stack.
As an alternative local IDE you can use WASABI which requires Java. Download interpreter arhive, unzip it and run with java -jar "Wasabi v1_4.jar" <Befunge program name>
command.
In input data end of line is marked with #10 character (you'll need this for problems which require reading the string till the end of line). Your program's return is checked to be accurate within the whitespace and line feeds; it's not necessary to end the printed lines with line feeds, and if a problem requires printing several numbers, they can be separated with any number of spaces. Extra spaces at the end of line are also allowed.