Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years. ×

By Nickolas, 8 years ago, translation, ,

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 ;

+
number>string print


#### 42

(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 ;

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
swap                     ! a_i (n - 1) in stack
sum-it +                 ! recur
]
if ;

sum-it                          ! sum n numbers from input
42 =
[ "YES" print ]
[ "NO"  print ]
if


Sources of information about the language:

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.
OS Ссылка
Linux, x32 Скачать
Linux, x64 Скачать
Mac OS X, x32 Скачать
Mac OS X, x64 Скачать
Windows, x32 Скачать
Windows, 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.

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.

Round Language
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!

• +78

 » 8 years ago, # | ← Rev. 3 →   +8 " 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 The round has 10 problems, sorted by estimated complexity."I think the missing word after "There are no " is "pretests" here. (Oh, it's "hacks".)BTW, will Wild-card Round 2 use the same rules as this one? It's a 7-day contest, and ACM-ICPC Style rules may lead to MILLIONS OF PENALTY...
•  » » 8 years ago, # ^ | ← Rev. 2 →   +12 ACM/ICPC rules will be here. Your solution will be judged on system tests immediately (no pretests).
•  » » 8 years ago, # ^ |   +48 I think that Wild-card Round 2 will be some kind of marathon with challenging problem.
•  » » » 8 years ago, # ^ |   +5 I agree with you. Maybe it'll be like Codechef's long contest (some traditional problems and a challenge problem as tie breaker) or Topcoder's marathon contest.
•  » » » 8 years ago, # ^ |   +72 Nope. It will be a literature contest. Each participant will be asked to write a short essay (2-3 pages) on the topic: "Why should organizers give me a wild-card?". The language participants will be obliged to write the essay in will be announced a day before the contest starts. It's a surprise!
•  » » » » 8 years ago, # ^ | ← Rev. 2 →   +8 How about setting it as a "Surprise Language Round"? The essay is only accepted in one language, for example, Na'vi's language...
•  » » 8 years ago, # ^ |   +1 I think: "There are no hacks."
•  » » » 8 years ago, # ^ |   0 Too bad.=(
•  » » 8 years ago, # ^ |   -10 Nice catch, thanks! I meant hacks, no hacks, but there will be no pretests as well.
 » 8 years ago, # |   +11 Good idea!it would be an interesting contest.
 » 8 years ago, # |   -8 i never expect a contest like this! wild card & surprise language? So coooooooool!
 » 8 years ago, # |   +7 It's fun but a little bit hard I guess.
 » 8 years ago, # |   +45 Where is the compiler?
•  » » 8 years ago, # ^ |   +16 Is it just me, or is the compiler download extremely slow?
•  » » » 8 years ago, # ^ |   +7 <20 KBps here. It will finish after the contest begin :(
•  » » » » 8 years ago, # ^ |   +8 25KBps here,very slow. The contest should be delayed for at least 15 minutes to keep it fair to everyone.
•  » » » » » 8 years ago, # ^ |   +4 it's even getting worse here. I'm afraid it can be finish after the contest is finished :(
•  » » » » 8 years ago, # ^ | ← Rev. 2 →   +9 I think I can finish the download next year.
 » 8 years ago, # |   +15 I may get tons of minus for saying this but please delay the contest for at least 15 minutes. I cant download the compiler within time and it will ruin my chance to stay in the cup. I am sure lots of user like me with slow net connection is suffering same problem.
•  » » 8 years ago, # ^ |   +6 use "CUSTOM TEST"
•  » » » 8 years ago, # ^ |   +4 That's actually not a bad solution, but I think shafaet's right that there's still an advantage to actually having the compiler.
•  » » » » 8 years ago, # ^ |   +1 bad thing about custom test is you have to wait 20 seconds to test another code after slight change. Its understandable that cf does it to decrease server load and its fair when you do just 1 or 2 tests but if you want to do a whole contest with custom test,it becomes very annoying.
 » 8 years ago, # |   +1 I'm hoping for LOLCODE, Wierd, or Whitespace :D
 » 8 years ago, # |   +1 This is my first time using this language.I think it is too hard for me.
 » 8 years ago, # |   0 at some point, i have to say, the organizer doesn't respect the contestants by choosing an unknown (to most) fixed programming language to be the only one usable. Anyway, this is wildcard. if you do this to your normal competition, you will see how many will like it. why most of the competition allowed as many language as possible? don't just randomly make up your rule as you like it.i miss round 1, and i thought this is a chance to make up. now i have no interest to participate at all.
•  » » 8 years ago, # ^ |   +1 Wildcard is wildcard; it has to be something special. SLR is such a type of very interesting competition. Yes, it's very different with usual contests, but it's one of the rules of the game.
•  » » » 8 years ago, # ^ |   +9 "SLR is such a type of very interesting competition"It took me a while to understand what did you mean by SLR. First I thought about camera :p
•  » » » 8 years ago, # ^ |   +8 yes, i understand. wildcard is wildcard. just feel a bit disappointed since i got up early just for this event, but then find it not interesting at all to me. Anyways, i am not trying to be offensive.
 » 8 years ago, # |   +34 I want to protect Nickolas and the idea of this round.Most of competitions do not have any kind of wildcards. TopCoder Open, Facebook Hacker Cup and so on. Idea of this round is not to give another chance to somebody how missed Round 1. Nobody was advised to hope for Wildcard and skip Round 1. It is just for fun. So if you skipped Round 1 it is your problems, not admins or Nickolas's.
 » 8 years ago, # |   +9 Also I want to ask you. Why don't you complain about TopCoder Open or Facebook Hacker Cup where there is no chance to advance if you accidently missed Round 1 of this competition?
•  » » 8 years ago, # ^ |   +7 in those cases, i will just move on, as they didn't say there is a make up with will give more 50 positions. But this one, i waited for the event, and then come, and then feel disappointed. Shouldn't at least make it clear this one will not accept c++ in advance?
•  » » » 8 years ago, # ^ |   +11 There was a lot of warnings about unusual rules of the wildcard rounds.
•  » » » » 8 years ago, # ^ |   +2 ok, my fault.however, organizer, i suggest making the rules clear instead of just saying "unusual" next time. I have no much experience in participating in these events. I had thought that "unusual" means some tricky scoring rules, which i don't care at all. I just opt in to write program for fun.anyways, let me stop here. Thanks for the effort and have fun.
•  » » » » » 8 years ago, # ^ |   +7 The English version of this post explained the rules very clearly, including the partSolutions 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 :-)Did you really think that this language will be C++? Please suggest how we could make this even more clear in the future rounds like this.
•  » » » » » » 8 years ago, # ^ |   +6 Yes, the rules is very clear. but it is not there when i registered for the event.As I am quite new to the site, i did check the rules several times to make sure i understand it. however, I didn't expect you made an update just yesterday(?)my suggestion is to make it clear, e.g. to say that the wildcard round is a SLR, and anything else related on the contest official page that describe the whole process and rules, well before the contest take place.Do not defer any description of the contest until later, because people are not suppose to visit this blog every day.
 » 8 years ago, # |   0 Why am I listed as an "unofficial"? I registered on time and entered as soon as the competition began..
•  » » 8 years ago, # ^ |   +4 Because you didn't qualify to Round 1.
•  » » » 8 years ago, # ^ |   -10 I placed 24th. Will I qualify to Round 2?
•  » » » » 8 years ago, # ^ |   +1 No, because you didn't qualify to Round 1.
•  » » 8 years ago, # ^ |   0 "Official" means that you passed either Qualification round.
 » 8 years ago, # |   -11 Please make 70 additional places in Round 2 :D
 » 8 years ago, # | ← Rev. 2 →   +8 How great the language document is! the author just forget to write examples.
 » 8 years ago, # |   +4 This was a really great contest, thanks Nickolas :DI've never heard of this language, but it's pretty cool. I think it's more fun than other functional languages like LISP just because of the stack :D
 » 8 years ago, # |   +1 I couldn't even install compiler on my Mac, using custom test to debug instead... what a catastrophe @_@
•  » » 8 years ago, # ^ |   +11 Why couldn't you install compiler? I used Mac to solve all the problems.
 » 8 years ago, # |   +2 Please write me about cheaters if you see some (or just a suspiciously similar codes).==Пожалуйста, пишите мне личные сообщения, если видите читеров или просто подозрительно похожие коды.
•  » » 8 years ago, # ^ |   +5 I saw Evgesko and olethra have the same code and almost same submission time. (BOTH 26th place).
•  » » » 8 years ago, # ^ |   +16 And also Jace_Beleren has the same code as theirs. (26th place)
•  » » » » 8 years ago, # ^ |   +13 Also geka666 and amirzoyan have the same code. (20th and 22nd place)
•  » » » » 8 years ago, # ^ |   +19 And Jovfer has the same code as Jace_Beleren's (23rd place)
•  » » » » » 8 years ago, # ^ |   0 Kazakhstan a_bekzat and etilen have the same code (43 and 44th place)
•  » » » » » » 8 years ago, # ^ |   +10 China MatRush and tiirz have the same D and E promblem code. (51st and 52nd place)
•  » » » » » » » 8 years ago, # ^ |   +10 Witalia and ChaRiL have the same code. (Unofficial 47th place and official 45th place )
•  » » » » » » » 8 years ago, # ^ | ← Rev. 2 →   0 Ooops, for the newbie like me, it's almost the standard way.
•  » » » » » » » 8 years ago, # ^ | ← Rev. 2 →   0 SergeyLazarev, DULGUUNBATMUNKH, MatRush have the same code on D and E
•  » » » » » » » » 8 years ago, # ^ | ← Rev. 2 →   +1 There are 11 solutions on D containing code, that differs only in USING: line among top 50 official participants Also I wonder how many participants have the same code on B :)
•  » » » » » » » » » 8 years ago, # ^ |   +1 Actually, near 50% of D solutions are the same)
•  » » » » » » » » 8 years ago, # ^ |   0 You should know that that is the standard solution for problem on D and E
•  » » » » » » » » » 8 years ago, # ^ | ← Rev. 2 →   0 Then why are you blaming all that people for cheating?)
•  » » » » » » » » » 8 years ago, # ^ |   0 Look at their solutions and submission times!
•  » » » » » » » » » 8 years ago, # ^ | ← Rev. 2 →   +1 Lol, then from that point you are cheater too
•  » » 8 years ago, # ^ |   0 I almost caught 10 or more cheaters and won't they get eliminated from the contest?
•  » » » 8 years ago, # ^ |   +12 You should know that that is the standard solution for problem on D and E
•  » » » » 8 years ago, # ^ |   0 Are you one of the cheaters? Just look at Evgesko and olethra will you say that was a coincidence???
•  » » » » » 8 years ago, # ^ | ← Rev. 2 →   0 It could be) A lot of users have similar solution. Are they all cheaters? Look at your code and tiirz, and MatRush. Nothing similar? Than I'm sure you are cheater too.
•  » » » » » 8 years ago, # ^ |   +1 Well, they are from one city, so they could be cheaters) But I can't tell that about others who are even from different countries. Are you hoping to get in 50 in that way?)
 » 8 years ago, # |   +1 I have a mini-editorial here: http://codeforces.com/blog/entry/4140It includes all my code (8 AC, 1 TLE, 1 unattempted) if you're interested. I think once you get the hang of one or two recursive solutions, the rest become a lot more obvious.
 » 8 years ago, # |   +2 This language is so awesome... http://www.youtube.com/watch?v=f_0QlhYlS8g