"2019.8.1 exam" questions do need to be patient and meticulous

  First summarize the examination process, probably hit a T2 T1 violence and fight violence and violence hit T3, T3 and then hit the correct answer. T3 second question then read the wrong title wrong lost 40 points I'm a sucker. . . Thus from 160 into 120, into a rk3 from RK5, I knock burst. T1 violent play very smoothly again through the sample, play a few hands and found no problem, T2 initially wanted to use $ 3 ^ n $ is the complement to do, but found that the complex is too high and there will be all kinds of useless state, so hit the discrete state $ dp $, this time left about two hours, integrity sincerity dry T3, it is found that water, I read the results I was wrong title xxxxxx.

  Do not spray, it was probably because not detailed enough.

Talk about the solution to a problem.

T1: water issues, speaking out of the examination room is a tree line, but do not think that good writing will do first discard the T2T3, after examination found that he stuck out a bucket combined solution, then replaced the recursive complexity of metaphysics, and finally A Lost.

 

T2: God dp. I called on the test-like pressure to get 20 points, positive solutions very God, like a long time after the test was to understand.

Provided $ dp [i] [j] $ is the number of points left to put the program in the first interval of about $ $ I $ J $ th column, $ l [i] $ prefix number and the left end section, $ r [i] $ is a prefix and a right segment endpoints.

Initialization: $ dp [1] [0] = 1 $

Target: $ dp [m] [n] $

equation:

1.  $dp[i][j]=dp[i][j]*A_{i-j-l[i-1]}^{l[i]-l[i-1]}$

2.  $dp[i+1][j]+=dp[i][j]$

3.  $dp[i+1][j+1]+=dp[i][j]*(r[i+1]-j)$

explain.

The first equation maintains the validity status, we use $ A_ {ijl [i-1]} ^ {l [i] -l [i-1]} $ whether to maintain the state of the method, the following is left up to the discharge the number above is left must put the number, if the above is clearly less than the following will return 0, at the same time determined that the state is not legitimate, the contribution of other states is zero. And why is it arranged?

First section is not a sequence, each of them accounting of how many lines should indeed be aligned with, but so many times multiplied by arrangement, rather than the number of combinations for these new arrangement flapper in the previous arrangement, do not miss some cases it ? Will not. This is equivalent to a step arrangement idea, because the previous arrangement can only be limited to $ i $ pointers before, but now is not the limit before the $ i $ pointer before, this should be the case in size than the ride small number of combinations, this is an emotional understanding. Rational judgment about it, you can write a classification tree diagram, the arrangement position of each sub-options are all drawn, eventually you will find the depth of the tree and other brothers have the same number of sons, and the depth of each single point the number is the number of permutations of our son just ride, that each of them can be transferred to the same multi-state mathematical description is to be replaced, multiplication principle, but is arranged multiplication.

The second equation, maintenance is also a case of letting go, which is inherited as a stage.

The third equation, maintenance is put a case on the right side, but this time you can not put put on $ r [i + 1] -j $ months, so take up.

Saying I arranged equation wrong tone for a long time. . .

 

T3:

Now look still pretty water, meaning that the formula appears to be very long in fact is a logical move left, is the highest position will appear in the lowest level of meaning.

Well, this is not a problem.

Push a formula, move left temporarily symbol represents the right move.

$ A [i] $ $ a $ prefix and XOR.

那么$ans=((x xor a[i])<<1)\ xor\ (a[m] xor a[i])$

  $ans=(x<<1)\ xor\ (a[i]<<1)\ xor\ a[m]\ xor\ a[i] $

  $d[i]=(a[i]<<1)\ xor\ a[m]\ xor\ a[i]$

  $ans=(x<<1)\ xor\ d[i]$

  Meaning that you let him find a value $ xor \ d [i] $ maximum.

  Build a 01trie.

  Running above dfs, if there are two sons, does not change the $ ans $ value, if it is a son, the current depth plus a bit.

  为什么这样做呢?所谓最优决策,因为自己是先手,所以其实找的是所有最小值中最大的一个所对应的值,而对手后手可以根据x来决策,那么如果有两个儿子,不管x这一位是0或者1他都可以走某一个儿子那条道路从而xor使这一位变成0,但是如果某个地方只有一个儿子,那么x就可以选择相反的数,这样他无法让你变成0,从而这一位加一,dfs是因为可以枚举每种情况,最后mp统计方案就好了。

(说的真轻松我把统计方案看成计算x原值结果错失40分)

 

  不过说实话题是我自己做的我也怨不上别人。但是类似的傻逼问题我已经不是第一次了,做题要耐心要细致,耐心,细致的审题是必要的,不要把这当成浪费时间,读错题浪费时间浪费分数,说白了还是浪费人生,比赛要真出了这么个问题不是要回家哭死,现在犯了就犯了总比以后犯要好。

  那么下次的目标就是:审题细致,做题极致。

Guess you like

Origin www.cnblogs.com/Lrefrain/p/11286419.html