The round is over, I hope you have enjoyed it. Here is the editorial.
The language of this round is COBOL (dialect COBOL85), one of the oldest programming languages (date of “birth”: 1959, so it’s twice older than I am). Despite being so old, it’s still in active use, though not in programming competitions, so I think it should be enough of a surprise for you :-)
The problem "A+B" (numbers A and B given in separate lines) can be solved in a following way:
IDENTIFICATION DIVISION. PROGRAM-ID. SOLUTION. DATA DIVISION. WORKING-STORAGE SECTION. 01 A PIC 9(10) VALUE ZEROES. 01 B PIC 9(10) VALUE ZEROES. 01 STR PIC X(10). PROCEDURE DIVISION. ACCEPT STR MOVE STR TO A ACCEPT STR MOVE STR TO B ADD A TO B DISPLAY B STOP RUN.
The testing system uses OpenCOBOL 1.0. To test your programs before submitting, you can:
- use “Custom test” tab in the contest interface.
- use ideone, language COBOL. Remember that by default doces submitted by anonymous are shown in “recent codes”; to avoid this I recommend registering and using “user’s” privacy option or at least use “private” option..
- install the compiler locally.
If you use Linux, this compiler is present in the repositories. After installing the compiler use
cobc -std=cobol85 -x <filename> to compile the code and create the executable.
If you use Windows and have Visual Studio C++ inslalled (tested with 2005 Express Edition):
- download http://assets.codeforces.com/files/surprize-language-round-5.7z
- extract the contents using password fe8b058ca460d2 to folder C: — unfortunately, the executables of the compiler require it to be located in folder C:\OpenCobol
- keep your source code in C:\OpenCobol as well, and compile them using
Surprise Language Round #5 will be held on February 22nd. It will continue the series of Unknown Language Rounds; we decided to replace the term “Unknown”, since we can’t really guarantee that the language of the round will be unknown to all participants, and the more rounds are there, the more probable it is that somebody has already seen one of the languages.
The rules will differ from the typical Codeforces Rounds:
- This round will be unrated and it will use ACM ICPC rules.
- It will have 5 problems, sorted by estimated complexity.
- Solutions are accepted only in one language, which will be announced at the beginning of the contest. Please reread this post at the beginning of the contest.
The contest is intended to be relatively small and not as brain-taxing as my previous one — it’s a weekday, after all. Good luck!