Nowadays, the Kingdom of Dreamgrid is suffering from a national pandemic. Fortunately, president Baobao is working effectively with the Center for Disease Control and they are trying their best to make everything under control. President Baobao has announced a policy of Social Distancing to prevent the diffusion of the virus. As the chief of CDC, you are required to research on the following problem: There are n people who need to be observed and you have already set a monitor in (0,0) on a 2-dimensional plane. Everyone should stay within the distance of r to the monitor. You also have to keep them stay away from each other as far as possible. To simplify the problem, you can only allocate them to integers coordinates. Please maximize ∑i=1n1∑j=i+1nd(i,j)2,sum_{i=1}^{n-1}sum_{j=i+1}^{n}d(i,j)^2,∑i=1n1∑j=i+1nd(i,j)2, where d(i,j) means the Euclidean distance between the i-th and the j-th person.
Nowadays, the Kingdom of Dreamgrid is suffering from a national pandemic. Fortunately, president Baobao is working effectively with the Center for Disease Control (CDC) and they are trying their best to make everything under control. President Baobao has announced a policy of Social Distancing to prevent the diffusion of the virus. As the chief of CDC, you are required to research on the following problem: There are n people who need to be observed and you have already set a monitor in (0,0) on a 2-dimensional plane. Everyone should stay within the distance of r to the monitor. You also have to keep them stay away from each other as far as possible. To simplify the problem, you can only allocate them to integers coordinates. Please maximize ∑i=1n−1∑j=i+1nd(i,j)2,sum_{i=1}^{n-1}sum_{j=i+1}^{n}d(i,j)^2,∑i=1n−1∑j=i+1nd(i,j)2, where d(i,j) means the Euclidean distance between the i-th and the j-th person.