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'}\) . Let \(m=2^{\alpha }M>2\) , where \(\alpha \) is a nonnegative integer and M is a positive odd integer. In this paper, we prove that if \(M=1\) and \(2\not \mid \alpha \) , then there exist two distinct sets \(A, B\subseteq \mathbb {Z}_{m}\) with \(|A\cup B|=m-1, |A\cap B|=1\) such that \(R_{A}(\overline{n})=R_{B}(\overline{n})\) for all \(\overline{n}\in \mathbb {Z}_{m}\) . We also prove that if \(M\ge 3\) or \(M=1\) and \(2\mid \alpha \) , then there do not exist two distinct sets \(A, B\subseteq \mathbb {Z}_{m}\) with \(|A\cup B|=m-1\) and \(|A\cap B|=1\) such that \(R_{A}(\overline{n})=R_{B}(\overline{n})\) for all \(\overline{n}\in \mathbb {Z}_{m}\) .