### Nickolas's blog

By Nickolas, 10 years ago, translation,

Congratulations to KADR who was the first of two people to solve all 8 problems!

#### 171A - Mysterious numbers - 1

The easiest way to make the problem statement unusual is to omit it. This is an extremely convenient approach — you don't have to maintain the statement in two languages or to worry that it might turn out to be ambiguous or too long or too scary. 690 people solved this problem, so evidently we can omit statements even in regular rounds :-)

As for the problem itself, it required to sum the first number and the reverse of the second number.

#### 171B - Star

They say it's better to see once than to hear ten times or to read a hundred times. In this problem we decided to check this and to replace the traditional textual statement with a single image. Same as in the previous problem, it did well — at least 645 participants recognized star numbers (sequence http://oeis.org/A003154 in OEIS), the numbers of balls needed to form a six-pointed start of certain size. After this one had only to code the formula — Sn = 6n(n−1) + 1.

#### 171D - Broken checker

What does one do if the statement is unknown and the only source of information about the problem is the checker? Right — you just try all possible functions which convert 5 input values into 3 output values and see which of them fits :-)

#### 171F - ucyhf

This problem finally has a statement! The trick is, it's encoded. We decided to be kind to you and to use the simplest cipher possible — Caesar cipher (each letter is shifted the same number of positions in the alphabet). By a long stretch of imagination one could break the cipher by hand — observe frequent letters and short words, deduce possible values of shift and verify it against the rest of the message. A lazier one could Google for a tool like this one and get the decoded version semi-automatically.

After cracking the statement the rest was almost easy — you had to find a prime whose reverse is a prime different from the original one (sequence http://oeis.org/A006567). 11184-th such number equals 999983, so one could do a brute-force check of all numbers in row.

#### 171E - MYSTERIOUS LANGUAGE

A special contest written by me and no special programming language? Impossible! I pulled myself up and made only 25% of all problems esoteric — that's two. There really should be three but the third interpreter refused to cooperate. Maybe next time...

What can one do if all he knows about the language is its compiler? Just run any code and see what the compiler says. In this case the compiler said "DO YOU EXPECT ME TO FIGURE THIS OUT?", and Google should tell you immediately that the language in question is INTERCAL. The problem simplifies to figure out the dialect used and how to output "INTERCAL" in it.

In Codeforces round #96 I gave a problem 133C - Turing Tape which explained the mechanism of string output in INTERCAL and asked to write a program which converted a string into an array of numbers which would print this string. Combine this knowledge with Hello, World! example and you get the program you need. Actually, that's what I did to write the reference solution.

PLEASE DO ,1 <- #8
DO ,1 SUB #1 <- #110
PLEASE DO ,1 SUB #2 <- #32
DO ,1 SUB #3 <- #72
DO ,1 SUB #4 <- #136
DO ,1 SUB #5 <- #88
DO ,1 SUB #6 <- #136
DO ,1 SUB #7 <- #64
DO ,1 SUB #8 <- #80


#### 171C - A Piece of Cake

The second esoteric problem had a Chef program as the statement. You had only to figure out what it does and do it in any regular language. It turns out that this program reads N followed by N numbers a1, a2, ..., aN and calculated the sum i * ai.

#### 171G - Mysterious numbers - 2

This one was much harder to guess but much easier to code. First two numbers were the start of a Fibonacci-like sequence, and the third one was the index of the required number in this sequence.

• +48

 » 10 years ago, # | ← Rev. 2 →   -10 .
•  » » 10 years ago, # ^ |   0 Will there be an editorial for problem H?
•  » » » 10 years ago, # ^ |   +3 Sorry, I left a comment in Russian and forgot to leave the same in English interface. Here it goes:Problem HYou had to find the coordinates of a point that is situated on a given distance from the beginning of Hilbert curve of given order. It is known that length of Hilbert curve of order n is 22 * n - 1. You could iterate through all orders of the curve from the biggest to the smallest and if the distance we still have to go is more than or equal to the length of a curve of a given order, we had to draw a curve of a given order and relocate from the beginning to the end. The only thing left is to learn how to find where will we be if we draw a curve of a given order rotated by some angle of 90 * k degrees. It is described, as well as the whole solution, in the Wikipedia.
•  » » » » 10 years ago, # ^ |   0 Ah, thanks!
 » 8 years ago, # |   0 Maybe people like to read this tonight xD