By Nickolas, 10 years ago, translation, In English

This round features Picat, a language somewhat similar to Prolog. We tried to make most of our problems convenient to solve using declarative approach.

The traditional A+B program (A and B are space-separated) looks as follows:

main =>
  A = read_int(),
  B = read_int(),
  C = A + B,
  println(C).

The main source of information about language is http://picat-lang.org/ The contest uses version 0.9. If the official site is not available, you can download archive with the compiler here, the password is b161bb757645d9f0.

Several notes:

  • "compilation error" verdict means that syntax is not valid. In most cases (for example, if your program calls unknown function), the verdict will be "wrong answer"
  • variable names must start with an uppercase letter or with underscore
  • it is recommended to use %n instead of \n in printf
  • don't use mip module, it writes debug information to stdout

March 28 20:00 (Moscow time) the first Wild-card round of VK Cup 2015 will take place, and it will be a Surprise Language Round. The rules:

  • There are two parallel rounds happening at once: Wild Card Round 1 and Wild Card Round 1 (Online Mirror). The main round is for teams which have passed VK Cup Qualification. Online mirror is open for everybody (not just VK Cup participants) as an individual competition. Teams which have already advanced to Round 2 can take part in the main round out of competition.
  • 50 additional places in Round 2 will be awarded to top 50 teams of VK Cup who passed Qualification but didn't advance to Round 2 from Round 1 (regardless of whether they participated in Round 1).
  • The contest will be 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-10 problems, sorted by estimated complexity, and runs for 2.5 hours.
  • 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.
  • 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) and links to useful manuals (in English). 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 #7 FALSE
Friday the 13th, Programmers' Day Ada
Surprise Language Round #6 Roco
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!


The contest is over; congratulations to the winners! The editorial is available here.

  • Vote: I like it
  • +140
  • Vote: I do not like it

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

Benefit of Unknown language contest that it is Unrated. Also ,The coder's introduce a new language.

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope that the surprise language would be really fun! I always enjoyed learning a new language in surprise language rounds :D

»
10 years ago, # |
  Vote: I like it +3 Vote: I do not like it

I think you use icon language :D

»
10 years ago, # |
  Vote: I like it +4 Vote: I do not like it

unrated?why? ):

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It doesnt fit into standart codeforces contest rules and meant to happpen for fun only.

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Where will be language announced? in contest area?

»
10 years ago, # |
  Vote: I like it +4 Vote: I do not like it

I had some problems loading archive file under Linux, installing p7zip-full does the trick.

»
10 years ago, # |
  Vote: I like it -26 Vote: I do not like it

I would like to sincerely thank the organizers for not choosing FALSE again

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

    FALSE was cool)

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

    Choosing the same language for the second time is not particularly fun in general, but choosing it for the second time in row would be definitely sad — regardless of the language itself :-)

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

i spent most of the time with a problem in the case there are not solutions in C; using solve_all works fine and gives me the solutions when they exist, but for the second sample case where there are no solutions, it gives me error(failed,main/0) and i could not get the catch mechanism to work...

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    We discuss this in the contest editorial (the Russian version for C is ready, the English one will be ready soon).

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Time limit for last question was pretty tight — I had to keep resubmitting until it passed.

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

    I think there's solution with complexity O(3N), which should pass comfortably. Though I haven't finished it in time & can't resubmit yet..

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Reference solution takes about 200ms.

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

      Then I guess the time limit is too loose and what I submitted (aka brute-force) shouldn't pass :P

      Code in edit.

      • »
        »
        »
        »
        10 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        It was our purpose to make it somewhat loose. And only 3 persons managed to solve it.

        Your solution is basically the intended solution, but to speed up it tremendously you can add Bd[1] #= 1, because the first value will always be 1.

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

          Wow, this is why declarative languages confuse me. That such a small detail could make the program 10x faster is mind-boggling! Thanks for the pointer.

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What is WA14 in F?

»
10 years ago, # |
  Vote: I like it +27 Vote: I do not like it

This might be the first and the last time when my university Prolog lessons were useful... :)