Topic link
http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=23842 Topic
Given n n number a1,a2,a3...an A_1,a_2,a_3...a_n, for all existing S S, the sum of three numbers of S S is Ai,aj,ak A_i,a_j,a_k ordered pair (i,j,k) (i,j,k) (i<j<k) ( Number of I. train of Thought
If the question does not limit three numbers to be different, it is very simple, with a polynomial a (x) a (x), where the coefficient of Xi X^i is the number of numbers I, a (x) 3 A (x) ^3 each Xsk X^{s_k} is the same number as the three for Sk S_k.
But now add three numbers with different restrictions, consider fixing three numbers and S S, at this time and for S s of the three different numbers of the composition of the number = all the random three numbers (unrestricted) composition and for s s of ordered pairs of numbers-two numbers of the same composition and for S s of the number of ordered pairs + The three numbers are the same and the number of ordered pairs of s S, which is a very obvious principle of tolerance and repulsion.
Expressed in a generative function (the following Sigma section omits the coefficients preceding these XI x^i)
All the random three numbers (unrestricted) of an ordered pair consisting of an answer polynomial =a (x) 3=∑x+3∑xy−6∑