[Training] fruit trees in Fujian

The meaning of problems

  There are a \ (n-\) points of the tree, each point there is a \ ([1, n] \ ) integer colors within \ (C_i \) , find how many paths are no repeating color (i.e., path there are two color can not be the same. Of course, a point is a legitimate path).
  \ (n \ le 10 ^ 5 \)

answer

  I would simply divide and conquer
  examSleep for an hour sleepAnd then look at this problem, like a long time found a sb problem, they feel the other two questions do not come, so confident yards up farming.
  The results zjr less than 1h to finish this problem has more than 200 lines of code A, and after I finished the tune 1h 3h, mentality collapse ......

Guess you like

Origin www.cnblogs.com/scx2015noip-as-php/p/11575363.html