思路: 枚举第一行,第二行把第一行白色的变黑,三、四如法案炮制。 C++ AC代码: #include <cstdio> #include <algorithm> using namespace std; const int n = 4, m = 4; // 两个棋盘 int a[n + 1], b[n + 1]; int change[n + 1]; // 二进制表示那里翻了哪里没翻 1: 翻了, 0: 没翻 // x的二进制中有多少个1 int cnt1(int x) { int cnt = 0; while (x) { if (x & 1) ++cnt; ...