For a given positive integer $n$, find the greatest positive integer $k$, such that there exist three sets of $k$ non-negative distinct integers, $A=\{x_1,x_2,\cdots,x_k\}, B=\{y_1,y_2,\cdots,y_k\}$ and $C=\{z_1,z_2,\cdots,z_k\}$ with $ x_j+y_j+z_j=n$ for any $ 1\leq j\leq k$. [Moderator edit: LaTeXified]
Problem
Source: China Western Mathematical Olympiad 2008
Tags: combinatorics proposed, combinatorics