记得判断一元限制有没有重复的
for (int i = 0; i < m - 1; ++i) { if (a[i].c == a[i + 1].c && a[i].d == a[i + 1].d) continue; ... }