voidsolve() { sum = 0, aver = 0; // 记录总数和平均值 cin >> n; for (int i = 1; i <= 3; i ++) for (int j = 1; j <= n; j ++) cin >> f[i][j]; // 使用二维数组方便后面的函数分讨 for (int i = 1; i <= n; i ++) sum += f[1][i]; aver = (sum + 2) / 3; for (int a = 1; a <= 3; a ++) for (int b = 1; b <= 3; b ++) for (int c = 1; c <= 3; c ++) if (a != b && b != c && c != a) if (work(a, b, c)) return; // 全排列枚举 puts("-1"); // 无解输出 -1 }