More than 2019 cattle off summer school camp (Session 8) - B - Beauty Values - water problems

https://ac.nowcoder.com/acm/contest/888/B

In fact water is indeed a problem, write a small look at the data to find the law, the so-called different degrees, in fact, turn into each element, the last position coordinates of the summation of the various elements appear, this is n², given count the contribution the number of times each coordinate is calculated, until it is covered up, how many there are that many contributions position.
Data is too small, no map or discrete, so the complexity of O (n).

Guess you like

Origin www.cnblogs.com/Yinku/p/11332906.html