csp-s 106 analog

  In fact, this attitude is very explosive, first of all an afternoon break last changed T3 cards often have not seen one afternoon, and I feel very irritable. Open up questions did not go well, T1 think for an hour did not move. Then jump T2, T2 is 80pts looks to see can take the first hit. T3 sentence only 10 points, wants to make a $ 2 ^ {2N} $ violence and the dotted can cheat. Look back T1, suddenly I found a $ N ^ 3 dp $, wanted to take the kick but less likely to fight violence. I went to check T2. Last Results: A of T1, T2 is only 40 minutes, T3 burst zero (wrong judgment data partition). Surprisingly very T1, T2 are 30 people around AC, it is too strong. Sub-portion T2 may no data.

T1:

  The ring is split to double strand, consider $ $ DP, set $ f [i] [j] $ $ I $ denotes the length of the combined forward optimal answer when j is set, the ultimate goal of $ max { f [i] [N]}, N <<= 2N $, before transferring the number of colors required pretreatment interval, so $ O (1) $ transfer, $ f [i] [j + k] = \ max \ {f [i] [j] + f [ij] [k] + cnt [ik-j + 1] [ij] * cnt [ij + 1] [i] \} $ (enumeration merging two sets length).

T2:

40pts:

  If you do not consider the decline, it must be by $ a $ and drugs from small to large. There downturn, the last step must not decline, enumerate the last step of the drug, before every step by $ ab $ select from large to small, the target height for the corresponding L minus $ a $. $ O (N ^ 2) $.

100pts:

  Consider how quickly calculate how many pills would need at least last step before reaching the target altitude. If you do not turn on the water, then the prefix directly after sorting and + half can be. With the water level limit, before we answer to being drowned. That is, to determine whether a particular day has been drowned. Turn on the water and record the same prefix (that is, the daily water level), the height of employing water-reducing height, to maintain this difference prefix $ min $, can initially determine whether one day drown. But we enumerate the last step, and $ min $ prefix is ​​static, that is, in the second division of the $ m $ judgment day, when $ m $ forward than the last step of the order, then use the prefix $ min $ directly can; if I $ $ $ m $ before, then the days before I $ $ $ min $ prefix still does not affect, and after $ $ I actually to be subtracted every day on the day level (since $ I $ as the final step can not be considered), so maintenance $ min $ value on the day the water level every day and subtract the height of the prefix. Because the query interval left endpoint is no longer just $ 1 $, so $ st $ table maintenance. The final two time-plus judgment day conditions before drowning. $ O (N \ log N) $.

T3:

  Simple to learn a little game theory and SG functions, but the difficulty lies in the question of actually transforming and modeling.

10pts:

  Without full-righting, simply can not judge who finally turned that $ (H + W) \ & 1 $.

30pts:

  We need to determine whether there is a full program of righting. Each row, each column can only be turned once, for a coin, if it is positive or not turning once, or turn rows and columns; if it is reversed, it is inverted rows or columns. For such problems would like bipartite graph, we abstract mapping: each row, each column are each a point, if coins $ (x, y) $ is positive, the line point $ X $, bullet points $ Y $ connected a "side 0," or even the "edge 1." What this means is that the color represents 1 turn, 0 means no turn, let the whole coin finally righting. Finally dyeing, after "side 1" color $ xor 1 $, to determine whether the conflict.

100pts:

  For a $ ICG $, it's win-win for $ SG! $ = 0, and a plurality of ICG total SG up for each sub-game and XOR. For the present problem is the construction of FIG Unicom each sub-block has become a game, the upper hand is determined according to the outcome SG function. Unicom consider each block, the last victory this fall and China Unicom block whose hand how many operations require related. The set point of the link to be operated with a $ A $ a block, there is no need to operate a $ b $, $ A $, $ b $ interchangeable because the upper hand can be selected. If it is a connected graph $ a $, $ b $ are even, losing the upper hand, $ SG = 0 $; if $ a $, $ b $ is odd, the subsequent situation SG $ $ $ $ 0 is, the present $ SG = 1 $ situation, the upper hand win; if $ a $, $ b $ an odd one even, subsequent situation $ SG = 1 $ or $ SG = 0 $, the present situation $ SG = 2 $, the upper hand win. Sub game and the final judgment in accordance with the exclusive OR.

Guess you like

Origin www.cnblogs.com/Duan-Yue/p/11824866.html