Hi,

The ICPC Vietnam National 2018 was held recently. It is the prelim round before the ICPC Vietnam Regional 2018.

Open contest will be on Kattis. Start time: Sat — Nov 17, 2:00:00 UTC

I think it would be a good practice for teams participating in ICPC this year.

Problems are prepared by:

- Lang Trung Hieu pewpew
- Pham Van Hanh skyvn97
- Trung Nguyen chemthan
- Trung Nguyen I_love_Hoang_Yen (yes we have 2 different Trung Nguyen)
- Le Don Khue beo_chay_so
- Some problems are contributed by some universities in Vietnam.

**Edit**: It seems you cannot ask clarification on Kattis. You can ask clarification here, I will try to answer.

Will the editorial be published somewhere?

I'll probably publish source code. There will only be editorial in Vietnamese (though it is not completed yet).

How can we solve Evolutions?

Messaged you privately

Our solution in the open contest was as follows:

Precompute all geometric sequences of the form

a^{n},a^{n - 1}b, ...,ab^{n - 1},b^{n}wheren≥ 2,aandbare relatively prime positive integers, and the sum of all the terms is less than or equal to 10^{6}. There are only 186170 of them. Precompute how many sequences map to each sum.Every geometric sequence of length 3 or more can be obtained by taking one of these precomputed sequences and multiplying all terms by a positive integer scaling factor (which may be 1).

Now, to answer a given query, we can directly enumerate how many geometric sequences of length 1 and 2 exist (1 and respectively). Factor

Sand compute the sum over all factors ofSof the precomputed sequence map.Contest starts in less than 4 hours.

Btw if you can't participate in this one, you can also create the contest yourself later on Kattis.

is there any editorial?