a) Given $555$ weights: of $1$ g, $2$ g, $3$ g, . . . , $555$ g, divide them into three piles of equal mass.
b) Arrange $81$ weights of $1^2, 2^2, . . . , 81^2$ (all in grams) into three piles of equal mass.
### Part (a)
Given 555 weights: \(1 \, \text{g}, 2 \, \text{g}, 3 \, \text{g}, \ldots, 555 \, \text{g}\), we need to divide them into three piles of equal mass.

1. **Calculate the total mass:**
   \[
   \text{Total mass} = \sum_{i=1}^{555} i = \frac{555 \cdot 556}{2} = 154290 \, \text{g}
   \]
   This uses the formula for the sum of the first \(n\) natural numbers: \(\sum_{i=1}^{n} i = \frac{n(n+1)}{2}\).

2. **Determine the mass of each pile:**
   \[
   \text{Mass of each pile} = \frac{154290}{3} = 51430 \, \text{g}
   \]

3. **Divide the weights into three piles:**
   We need to find three subsets \(A\), \(B\), and \(C\) such that \(m(A) = m(B) = m(C) = 51430 \, \text{g}\). This part requires a combinatorial approach or algorithm to partition the set into three subsets of equal sum. This is a complex problem and typically solved using dynamic programming or backtracking algorithms.

### Part (b)
Given 81 weights of \(1^2, 2^2, \ldots, 81^2\) (all in grams), we need to arrange them into three piles of equal mass.

1. **Calculate the total mass:**
   \[
   \text{Total mass} = \sum_{i=1}^{81} i^2 = \frac{81 \cdot 82 \cdot 163}{6} = 180441 \, \text{g}
   \]
   This uses the formula for the sum of the squares of the first \(n\) natural numbers: \(\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}\).

2. **Determine the mass of each pile:**
   \[
   \text{Mass of each pile} = \frac{180441}{3} = 60147 \, \text{g}
   \]

3. **Initial division into three sets:**
   Let us split the set \(X = \{1^2, 2^2, \ldots, 81^2\}\) into three sets \(A\), \(B\), and \(C\) as follows:
   \[
   A = \{1^2, 4^2, 7^2, 10^2, \ldots, 79^2\} \quad \Rightarrow \quad m(A) = 57942 \, \text{g}
   \]
   \[
   B = \{2^2, 5^2, 8^2, 11^2, \ldots, 80^2\} \quad \Rightarrow \quad m(B) = 60129 \, \text{g}
   \]
   \[
   C = \{3^2, 6^2, 9^2, 12^2, \ldots, 81^2\} \quad \Rightarrow \quad m(C) = 62370 \, \text{g}
   \]

4. **Adjusting the sets:**
   - We need to increase \(m(B)\) by 18 to reach 60147. This can be done by swapping elements between sets.
   - Swapping single elements won't work since \(x^2 - y^2 = 18\) has no integer solutions.
   - We can swap pairs of elements. For example, \(a = 2, b = 14\) from \(B\) and \(c = 7, d = 13\) from \(A\cup C\) such that \(a^2 + b^2 + 18 = c^2 + d^2\).

5. **Performing the swap:**
   - Swap \(\{2, 14\} \in B\) with \(\{7, 13\} \in A\):
     \[
     B = \{7^2, 5^2, 8^2, 11^2, 13^2, 17^2, 20^2, 23^2, \ldots, 80^2\} \quad \Rightarrow \quad m(B) = 60147 \, \text{g}
     \]
     \[
     A = \{1^2, 4^2, 2^2, 10^2, 14^2, 16^2, 19^2, \ldots, 79^2\} \quad \Rightarrow \quad m(A) = 57924 \, \text{g}
     \]

6. **Further adjustments:**
   - Increase \(m(A)\) by 2223 and decrease \(m(C)\) by 2223. Note that \(2223 = 48^2 - 9^2\).
   - Swap \(9^2\) and \(48^2\) between \(A\) and \(C\):
     \[
     A = \{1^2, 4^2, 2^2, 10^2, 14^2, 16^2, 19^2, \ldots, 79^2, 9^2\} \quad \Rightarrow \quad m(A) = 60147 \, \text{g}
     \]
     \[
     C = \{3^2, 6^2, 48^2, 12^2, \ldots, 81^2\} \quad \Rightarrow \quad m(C) = 60147 \, \text{g}
     \]

The final answer is \( \boxed{ A, B, C } \) with \(m(A) = m(B) = m(C) = 60147 \, \text{g}\).