The contest is over. My sincere respect to the winner in overall run nab who solved all 10 problems in 1h 25m, and congratulations to the winner in the official contest winger who repeated this heroic deed in 1h 52m.
Here is the editorial.
The language of this round is Factor — a stack-based functional language with a sophisticated system of built-in libraries (dictionaries). Sample programs:
A + B
(A and B are given in different lines):
USING: io kernel math math.parser ; readln string>number readln string>number + number>string print
(given the quantity of numbers, and then the numbers themselves, one per line, output YES if their sum equals 42, and NO otherwise):
Version 1 (Nickolas)
USING: io kernel math math.parser sequences ; readln string>number iota 0 [ drop readln string>number + ] reduce 42 = [ "YES" ] [ "NO" ] if print
Version 2 (Gerald, ! is comment till the end of line)
USING: io kernel math math.parser formatting sequences prettyprint io.streams.byte-array io.streams.sequence ; IN: template : sum-it ( n -- answer ) dup 0 = ! if [ ] ! zero in stack [ 1 - ! decrease count by one readln string>number ! read next a_i swap ! a_i (n - 1) in stack sum-it + ! recur ] if ; readln string>number sum-it ! sum n numbers from input 42 = [ "YES" print ] [ "NO" print ] if
Sources of information about the language:
- Factor official site and documentation
- an artice by the author (.pdf)
- an article with examples at Progopedia
- examples at Rosetta Code
- one more article
The tester uses the official Factor compiler, version 0.94. To test your programs before submitting, you can:
- use “Custom test” tab in the contest interface.
- use ideone, language Factor (it has 0.93, but at the level of the language used at this contest there should be no differences). Remember that by default doces submitted by anonymous are shown in “recent codes”; at the previous contest 90% of "recent codes" were COBOL codes from the contest! To avoid this I recommend registering and using “user’s” privacy option or at least using “private” option.
- install the compiler locally.
|Mac OS X, x32||Скачать|
|Mac OS X, x64||Скачать|
In both Windows and Linux the process of installation is the same: download the archive for your OS, extract the contents to any directory, move to it and run the compiler from the command line: Windows — "factor.com program.factor", Linux — "./factor program.factor"
The contest opens at 19:00 Moscow time; we'll put up an archive with the compiler (both Linux and Windows versions) 30 minutes before the start, and announce the language 5 minutes before.
Archives are password-protected ( e98897e46008ee01 ). You will be able to run your code online as well.
|Mac OS X||Download|
The first Wild-card round of VK Cup 2012 is less than 24 hours away, and it's time to announce the rules. But first let me cover a couple of organizational issues:
- Remember that this round requires separate registration (being registered for VK Cup only is not enough), the registration continues till the end of the contest.
- 50 additional places in Round 2 will be given to top 50 participants of VK Cup which passed Qualification but didn't advance to Round 2 from the main Round 1 (regardless of whether they participated in the main Round 1).
- Everybody else can participate out of competition.
- The contest will be unrated for everybody.
So what's so unusual about this round? It will be Surprise Language Round (also known as Unknown Language Round), similar to earlier Codeforces rounds. The rules:
- 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 10 problems, sorted by estimated complexity.
- Solutions are accepted only in one language, which will be announced at the beginning of the contest. The language really exists, we didn't invent it for this occasion. No, it's not Brainfuck :-)
- Please reread this post at the beginning of the contest: we will announce the language and add instructions to install the compilers (the contest interface will provide an option to run your solutions online) and links to useful manuals. Other than that, learning the language is up to the competitor.
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.
|Surprise Language Round #5||COBOL|
|Unknown Language Round #4||Befunge|
|Unknown Language Round #3||Pike|
|Unknown Language Round #2||Io|
|Unknown Language Round #1||Tcl|
I am the writer for this round; thanks Gerald for testing it. I'm very fond of this language, and I hope you'll like it just as much. Good luck!