For each subject, compute the difference between its score and its group mean. You thus have to compute each of the group means, and compute the difference between each of the scores and the group mean to which that score belongs