JXOI 2018 Roll Out

I heard that it is a tradition for provincial VAN to write travel notes, so Ben Konjac will also post one.

  • DAY 0

I originally thought that the provincial election was not held in JKFZ, but the result will be in JKFZ again. After all, the school will feel better. I applied to the godfather with jyh to stop the class for a day, but the godfather agreed with a smile, which is a bit unexpected.

In the morning, I played with jyh in the mock competition of yjw senior Yali during the training camp, T1 line segment tree, T2. . . T3. . . Then happily hit the line segment tree, the result. . . Burst 0.

After lunch, dalao jyh talked about his T3 ideas. In short, he felt very powerful.

In the afternoon, dalao jyh wrote that T3 was a perfect score, orz. Then I was pulled by the coach to talk with yjw about the experience before the game, and then somehow it became a simulation game problem explanation. It turned out that the reason why T1 burst 0 was because the & and | operations could not simply be marked, and I was still naive.

I finally got home in the evening, and I typed the template casually. I wanted to play CSGO, but I fell asleep after secretly playing a few chaotic shootouts.

  • DAY 1

I came to JKFZ by car in the morning and played the number theory related templates several times, even someone like Mobius who was not very good at exams.

However. . .

It's always a little weird when I go to the exam room with jyh, but it's relieved. I tried the machine on the machine, except that the keyboard is a little uncomfortable (it's funny when I think that the machine can't open the T disk when it is NOIP). The topic was posted shortly after.

The first time I saw the title, Jiutiao was pitiful? woc is another question from Ji Ruyi. After viewing all the PDFs, I started to do T1. I couldn't understand T1 at first, and after pushing it on the scratch paper, I felt that the idea was quite easy.

The general topic of T1: He first tells you a sorting method called gobo sort: for a sequence a that becomes n, randomly generate another sequence p with a length of n, and then construct a sequence b with a length of n, so that \(b_i\ ) \(=\) \(a_{p_i}\) . If this b is ordered, stop the operation and complete the sorting, otherwise repeat the operation of generating the p sequence.

Then you are given a sequence of length n, and m,l,r. You are required to attach m numbers in the range [l, r] to the n-long sequence, so that the expected number of randomly generated sequences in gobo sort is the most.

I did some scratching on the scratch paper and found that you just need to average the number of occurrences of each number. How to calculate it will not be repeated here, but I found a few points in the examination room that need to be paid attention to:

  1. Discretization 2. Can be maintained with heap 3. Inverse is required due to factorial, division and modulo operations.

However, what hurts is that I forgot how to fight the inverse yuan! ! ! I have been pushing for a long time in the examination room, so I have to give up and go to T2 T3

T2 fights violence, T3 doesn't even know how to fight...

In short, I was very decadent after leaving the examination room. T1 did not play inverse yuan, and no optimization was added. It is estimated that it will be cool.

Then in the afternoon, senior yjw came up with a solution, and took a look at the idea of ​​T1. It was true. T2 used sigma to push a lot of results. The time complexity is only O(r)? T3 interval DP, so difficult and unexpected.

Later, I looked at the inverse element and found that it was so easy to find. Fermat's little theorem was used in the examination room but it was not introduced... or I was too weak.

  • postscript

In short, I am still unwilling, and it just reflects my shortcomings. Now I still wait for the results to come out.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325028213&siteId=291194637