Find all functions $f:\mathbb{Z}^{+}\to\mathbb{Z}^{+}$ such that $$m^{2}+f(n)^{2}+(m-f(n))^{2}\geq f(m)^{2}+n^{2}$$ for all pairs of positive integers $(m,n)$.
1. **Substitute \( m = f(n) \) into the given inequality:**
   \[
   m^2 + f(n)^2 + (m - f(n))^2 \geq f(m)^2 + n^2
   \]
   becomes:
   \[
   f(n)^2 + f(n)^2 + (f(n) - f(n))^2 \geq f(f(n))^2 + n^2
   \]
   Simplifying, we get:
   \[
   2f(n)^2 \geq f(f(n))^2 + n^2
   \]
   Rearranging terms, we have:
   \[
   f(n)^2 - n^2 \geq f(f(n))^2 - f(n)^2
   \]

2. **Claim 1: \( f(n) \geq n \) and \( f \) has a fixed point.**

   - Consider the sequence \( f(n)^2 - n^2 \geq f^2(n)^2 - f(n)^2 \geq f^3(n)^2 - f^2(n)^2 \geq \dots \)
   - If this sequence ever goes negative, then there exists \( C \) such that for all \( k \geq C \), \( f^{k+1}(n)^2 - f^k(n)^2 < 0 \implies f^{k+1}(n) < f^k(n) \).
   - This would imply \( f^C(n) > f^{C+1}(n) > f^{C+2}(n) > \cdots \), which is not possible over positive integers.
   - Hence, the sequence remains non-negative, implying \( f(n)^2 - n^2 \geq 0 \implies f(n) \geq n \).

   - Since the sequence is non-increasing and non-negative, it eventually becomes constant. Suppose \( t \geq 0 \). Then there exists \( C \) such that for all \( k \geq C \), \( f^{k+1}(n)^2 - f^k(n)^2 = t \).
   - If \( t > 0 \), then \( f^{k+1}(n) > f^k(n) \) for all \( k \geq C \), causing \( f^k(n) \) to grow arbitrarily large, which contradicts the constant difference \( t \).
   - Therefore, \( t = 0 \) and there exists \( k \) such that \( f^{k+1}(n) = f^k(n) \), implying \( f \) has a fixed point. \(\blacksquare\)

3. **Claim 2: If \( f(n) = n \), then \( f(n+1) = n+1 \) and \( f(n-1) = n-1 \).**

   - Assume \( f(n) = n \). Substituting \( m = n+1 \) into the original inequality:
     \[
     (n+1)^2 + f(n)^2 + (n+1 - f(n))^2 \geq f(n+1)^2 + n^2
     \]
     Simplifying, we get:
     \[
     (n+1)^2 + n^2 + 1 \geq f(n+1)^2 + n^2
     \]
     \[
     (n+1)^2 + 1 \geq f(n+1)^2
     \]
     Since \( f(n+1) \geq n+1 \), we have:
     \[
     f(n+1)^2 = (n+1)^2 \implies f(n+1) = n+1
     \]

   - Similarly, substituting \( m = n-1 \) into the original inequality:
     \[
     (n-1)^2 + f(n)^2 + (n-1 - f(n))^2 \geq f(n-1)^2 + n^2
     \]
     Simplifying, we get:
     \[
     (n-1)^2 + n^2 + 1 \geq f(n-1)^2 + n^2
     \]
     \[
     (n-1)^2 + 1 \geq f(n-1)^2
     \]
     Since \( f(n-1) \geq n-1 \), we have:
     \[
     f(n-1)^2 = (n-1)^2 \implies f(n-1) = n-1
     \]
     \(\blacksquare\)

4. **Combining the claims and using induction:**

   - By induction, if \( f(n) = n \) for some \( n \), then \( f(n+1) = n+1 \) and \( f(n-1) = n-1 \).
   - Therefore, \( f(n) = n \) for all \( n \).

The final answer is \( \boxed{ f(n) = n } \).