联系衔接:blcakcat
HDU 4825
从最高为开始贪心,如何可以走当前位的异或结果就走异或结果否则就走当前结果
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <utility>
using namespace std;
#define LL long long
#define pb push_back
#define mk make_pair
#define mst(a, b) memset(a, b, sizeof a)
#define REP(i, x, n) for(int i = x; i <= n; ++i)
const int MOD = 1e9 + 7;
const int qq = 1e5 + 10;
const int INF = 1e9 + 10;
LL value[32 * qq];
int ch[32 * qq][2];
int n, m, node_cnt;
void Init() {
node_cnt = 1;