2019/10/3 Comprehensive Test Summary

T1:

  The meaning of problems: a sequence, each number has a value of h and p values, for Finding p have the same value between the number of much less than the value of h is a number of m

  Ideas: Simple questions, seek first the prefix and the conclusion was swept again the answer (but debug spent some time);

  Solution: ditto;

T2:

  The meaning of problems: given n, m, D, beginning with n represents a number m each time a non-operation (non-zero minimum value) of the number becomes [Min -d, Min], the Q there are several number n becomes 0 reform;

  Thinking: See title thought DP, consider DP [i] [j] [e] represents the minimum value of i, there is a number i of the j-th, e an operation scheme of a number greater than i, each O (d ) transfer. Consider optimization, and so the transfer with the prefix becomes O (1). Considering also the special case n == 1, is a class Feibolaqi recurrence series;

  Interpretations: dp [i] represents the number 0 is not the minimum value in the case where the number i of the program, and the prefix optimization O (1) transfer, the last count value dp of 1 ~ d is the answer;

T3:

  Meaning of the questions: a lesson to the tree, each node has a string, right to the edge, right to the point and asked randomly selected two points of their product right point on the right side * minimum * path string longest common suffix length expectations;

  Ideas: no time, n ^ 3 violence sum;

  Solution: longest common suffix - in turn build the Trie. Minimum edge - the edge descending order, one by one, add to the mix, and then set the maintenance check. Optimization - using a = sigma (i = 1 ~ n infinity) [i <= a], concluded Trie trees and answers related to the depth may be calculated in the process of merging Trie;

Guess you like

Origin www.cnblogs.com/Cduiz/p/11621113.html