公式

E - Three View Drawing 解説 by evima


As a general strategy, consider adding and removing a group of three triples such as \((a, b, c), (b, c, a), (c, a, b)\) at a time. Exceptionally, \((a, a, a)\) counts as one group by itself.

First, construct a solution for \(K = N^2\) to align with the above strategy. For example, the set of points satisfying \(x + y + z \equiv 0 \pmod{N}\) works. From here, we want to construct solutions for any number of points by removing points by group. Let \(r\) be the number of points we want to remove. Since most groups consist of three elements, we consider removing \(r \bmod 3\) points first, then removing three points at a time.

First, consider the case where \(N \equiv 0 \pmod{3}\). In this case, the only groups that consist of one point like \((a, a, a)\) are \((0, 0, 0)\), \((N/3, N/3, N/3)\), and \((2N/3, 2N/3, 2N/3)\), and the rest all consist of three points like \((a, b, c)\). Therefore, we remove \(r \bmod 3\) points from the former groups and remove as many as needed from the latter groups.

Next, consider the case where \(N \not\equiv 0 \pmod{3}\). In this case, the only group that consists of one point like \((a, a, a)\) is \((0, 0, 0)\). Therefore, with the previous strategy, we cannot handle the case where \(r \bmod 3 = 2\), and we need to think of a different method just for this case. Consider the group that contains the triple \((1, 1, t)\), where \(t \neq 1\), which means it is a group consisting of three elements. After removing this group, we can add \((1, 1, 1)\), yielding a solution for \(K = N^2 - 2\). Then, by removing groups of three elements, we can eventually reduce the set to only \((0, 0, 0)\) and \((1, 1, 1)\), so we can construct a solution for any \(K\) even in the case \(r \bmod 3 = 2\).

投稿日時:
最終更新: