Nickolas's blog

By Nickolas, 13 years ago, translation, In English

The contest is over; the editorial is here. I've mis-estimated the complexity of the problems — but how could I possibly guess who will arrive and finish everything in 40 minutes :-) Congratulations to the winners — the slowest and the most relaxed of them took under an hour to solve all the problems.


Today's round features Roco — a little-known esoteric language with a special approach to loops and subroutines. The programs written in it look a bit bulky, especially when compared to Befunge, but this is compensated by their relative simplicity and readability. Here is a program which calculates the sum of two given numbers:

iin [0]
iin [1]
add [2] [1] [0]
iout [2]
ac

There is little information about this language on the web — the only two sources known to me are the author's site and Progopedia article with commented sample programs.

There is also exactly one interpreter for Roco, written by its author. To run it, one has to have C++ installed (the author uses g++, and so do we), compile the interpreter source code into an executable file and run programs using command "roco program.roco". You can download the interpreter here.


Surprise Language Round #6 will take place on May 25th. This contest is dedicated to an event of great importance to me: last week we celebrated the 5th anniversary of Progopedia project (and two and a half years since I joined the project). To make the contest even more memorable, we decided to add the prizes: Top-5 finishers will receive T-shirts, and not just plain Codeforces T-shirts but special ones designed especially for Surprise Language Rounds. By the way, the design is not finalized yet, so feel free to suggest something witty or funny, or both.

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 8 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. For reference, here is the list of Surprise/Unknown Language Rounds which took place on Codeforces earlier.

Round Language
VK Cup 2012 Wild-card Round 1 Factor
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

Good luck!

Announcement of Surprise Language Round 6
  • Vote: I like it
  • +79
  • Vote: I do not like it

»
12 years ago, # |
  Vote: I like it +39 Vote: I do not like it

I think you should parody those Code Jam "What language do you speak?" shirts with whacky languages :D

»
12 years ago, # |
  Vote: I like it +46 Vote: I do not like it

Say good-bey to T-shirt... T_T Congratulate to the top-5 who made it. Will there be any T-shirts in future Unknown/Surprise Language Round?

»
12 years ago, # |
  Vote: I like it +21 Vote: I do not like it

I find it funny how all of my solutions ended with "AC" :)

»
12 years ago, # |
  Vote: I like it +22 Vote: I do not like it

I somehow managed this without understanding the semantics of the coroutines... I just treated "ac" as "return" and then got really lost when my programs would continue past the return line. Now that I've taken the time to read more about the language, everything makes sooooo much more sense.

Thanks for another awesome SLR :D :D :D

»
12 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Nice contest! However, I think the contest would be more interesting if there were more difficult "algorithmic" problems, so we can have more interesting scoreboard. The current problems are like "implement standard problems using a new language" :)

  • »
    »
    12 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    I think the scoreboard is interesting enough. I see 17 red people there, with 14 of them in top 30, even though the problems are like "implement standard problems using a new language.”

    Thank you for another nice contest!

»
12 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

In Roco, what's the relation of [0] and [[0]]?

  • »
    »
    12 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it
    if:
    [0] == 5
    [5] == 10
    then:
    [[0]] == 10
    
  • »
    »
    12 years ago, # ^ |
    Rev. 5   Vote: I like it 0 Vote: I do not like it

    [[0]] is a pointer. E.g. asking [[n]] means that you ask variable with index [n]. If n is 3 and [3] is 4 than [[3]] <=> [4].

»
12 years ago, # |
  Vote: I like it +5 Vote: I do not like it

For the sorting problem I have used Counting Sort algortihm...But there's something wrong in my code that I cannot figure out..I testes my code with 2 2 1 and the out put is 1 2 3 3 3 3 3 3 3.......3

Can Someone tell me where I am going wrong.. Code

  • »
    »
    12 years ago, # ^ |
      Vote: I like it +19 Vote: I do not like it

    Have you noticed that "When a coroutine is called, its execution starts not from the start, but from the last position of its instruction pointer"?

    • »
      »
      »
      12 years ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      Thanks .. I over looked it... Here's the accepted version->Code

    • »
      »
      »
      12 years ago, # ^ |
        Vote: I like it +6 Vote: I do not like it

      I did all the problems in 5-8 minutes each except for this one which took me like... 23 because of exactly the same problem XD

      Apparently it pays to actually read the documentation.

      • »
        »
        »
        »
        12 years ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        Nice to know I wasn't the only one who suffered through that... Can you see any application in which this behavior actually makes sense?

        • »
          »
          »
          »
          »
          12 years ago, # ^ |
            Vote: I like it +6 Vote: I do not like it

          This is an esoteric language; they are not meant to make any sense :-)

»
12 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Nice language! I've just learnt another interesting language. Let's see if someone (especially participants of this contest) will use it for Google Code Jam Round 2 tomorrow :D

»
12 years ago, # |
Rev. 4   Vote: I like it 0 Vote: I do not like it

Any idea why the following is an infinite loop? Seems it has the potential to become a candidate problem:)

co infinite_loop

{

eq [[0]] [0] 0 // isn't [[0]] == [0] == 1 after executing this sentence,

if [[0]] ac // then exit the coroutine?

}

set [0] 0

ca infinite_loop

ac

  • »
    »
    12 years ago, # ^ |
    Rev. 2   Vote: I like it +5 Vote: I do not like it

    if [[0]] ac

    But that is really: if [1] ac

    And that's never true.

  • »
    »
    12 years ago, # ^ |
    Rev. 3   Vote: I like it +8 Vote: I do not like it

    [[0]]=[0]. After eq [[0]] [0] 0
    [0]=1
    So [[0]]=[1]=0

»
12 years ago, # |
Rev. 2   Vote: I like it -23 Vote: I do not like it

If any of you are interested in participating in an external surprise language contest, there is a contest starting tomorrow(3rd march) at 12:30 Gmt.

Contest Link: http://chaos.techkriti.org