//使用gray code的解法 #include <iostream> #include <cmath> using namespace std #define ZERO 0 #define ONE 1 #define ODD 1 #define EVEN 0 #define RIGHT 1 #define LEFT 0 #define MAX 10