版本比较
P2447题解
正文
增加 4 行删除 4 行
52 行未改动53545556575857585960616263646566666768697030 行未改动10110210310410510510652 行未改动
AC 代码:
```cpp#include <iostream> #include <cstdio> #include <iostream>#include <cstdio>#include <bitset>#include <cctype>// 使用宏定义使程序更清晰(虽然也没有清晰多少)#define ALIEN "?y7M#"#define EARTH "Earth"char buffer[1010];std::bitset<1010> matrix[2010]; // matrix[1~n]:增广矩阵,0 位置为常数int GaussElimination(int n, int m) // n 为未知数个数,m 为方程个数,返回 0 表示多解,否则返回最少用到的方程数 int GaussElimination(int n, int m) // n 为未知数个数,m 为方程个数,返回 0 表示多解,否则返回最少用到的方程数{ int ans = -1; // 方程使用数 for (int i = 1; i <= n; i++) // 循环消去第 i 个元 {30 行未改动 printf("%s\n", matrix[i].test(0) ? ALIEN : EARTH); } else printf("Cannot Determine\n"); return 0;} }```