For any positive integer m, let \(\mathbb {Z}_{m}\) be the set of residue classes modulo m. For \(S\subseteq \mathbb {Z}_{m}\) and \(\overline{n}\in \mathbb {Z}_{m}\) , let the representation function \(R_{S}(\overline{n})\) denote the number of solutions of the equation \(\overline{n}=\overline{s}+\overline{s'}\) with unordered pairs \((\overline{s}, \overline{s'})\in S \times S\) and \(\overline{s}\ne \overline{s'}\) . In this paper, we determine the structure of all sets A and B satisfying \(|A\cup B|=m-1, |A\cap B|=1\) and \(R_{A}(\overline{n})=R_{B}(\overline{n})\) for all \(\overline{n}\in \mathbb {Z}_{m}\) , where m is a positive even integer.