No.8031 (Physics) Long-Range Interaction
Problem Statement
Let's practice computing the electric potential in an ionic crystal.
Assume the following.
・The crystal extends with a cube of side length $1$ as its unit structure. That is, letting $Q(r)$ be the amount of charge at position $r$, $Q(r)=Q(r+n)$ ($n$ is an integer vector) holds for any $r$ and $n$.
・The total charge of the ions contained in one unit structure is 0. That is, the unit structure is electrically neutral.
・The ions in the unit structure obey the relation (*) (see the Input section).
Output the electric potential at the origin under these conditions.
Precisely, letting $f(R)$ be the potential at the origin when considering only the contributions of the ions inside a sphere of radius $R$, output $\lim_{R→\infty} f(R)$. It is guaranteed that $f(R)$ converges to a finite value.
Input
$α_{000}$ $α_{001}$ $α_{010}$ $α_{011}$ $α_{100}$ $α_{101}$ $α_{110}$ $α_{111}$
$β_{111}$ $β_{113}$ $β_{131}$ $β_{133}$ $β_{311}$ $β_{313}$ $β_{331}$ $β_{333}$
In the region $0 \leq x,y,z\lt 1$, ions exist only at points of the form ($\frac{i}{4},\frac{j}{4},\frac{k}{4}$) (where $i$,$j$,$k$ all have the same parity).
The first line gives, in lexicographic order of ${a,b,c}$ ($a,b,c$ are each $0$ or $1$), the charge $α_{abc}$ of the ion at position $(\frac{a}{2},\frac{b}{2},\frac{c}{2})$. The second line gives, in lexicographic order of ${d,e,f}$, the charge $β_{def}$ of the ion at $(\frac{d}{4},\frac{e}{4},\frac{f}{4})$ ($d,e,f$ are each $1$ or $3$).
Assume that the following hold for $α、β$.
$4(α_{000}+α_{111})=-∑_{i,j,k}β_{ijk}$・・・(*)
$∑_{i,j,k}α_{ijk}+∑_{l,m,n}β_{lmn}=0$
$-5 \leq α_{ijk}\leq5$
$-5 \leq β_{lmn}\leq5$
Output
Output the electric potential at the origin.
Your answer is accepted if either the absolute error or the relative error is at most $10^{-3}$. Print a newline at the end.
Sample
Input
1 -1 -1 1 -1 1 1 -1 0 0 0 0 0 0 0 0
Output
-3.495
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
37zigen
はむこ