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.
Good luck!
The contest is over; congratulations to the winners! The editorial is available here.
Benefit of Unknown language contest that it is Unrated. Also ,The coder's introduce a new language.
Really?
Hope that the surprise language would be really fun! I always enjoyed learning a new language in surprise language rounds :D
I think you use icon language :D
Majid is so smart , hope he becomes international grandmaster :)
:|
and I think you are crazy coder !
unrated?why? ):
It doesnt fit into standart codeforces contest rules and meant to happpen for fun only.
Where will be language announced? in contest area?
I had some problems loading archive file under Linux, installing p7zip-full does the trick.
I would like to sincerely thank the organizers for not choosing FALSE again
FALSE was cool)
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 :-)
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...
We discuss this in the contest editorial (the Russian version for C is ready, the English one will be ready soon).
Time limit for last question was pretty tight — I had to keep resubmitting until it passed.
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..
Reference solution takes about 200ms.
Then I guess the time limit is too loose and what I submitted (aka brute-force) shouldn't pass :P
Code in edit.
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.
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.
What is WA14 in F?
This might be the first and the last time when my university Prolog lessons were useful... :)