For this Question: You are given a tree with N nodes, where the edges have weights. The weights of the edges are hidden. Your objective is to find the weights of all the edges. To help you find the weights, for M pairs of nodes, you are given the xor of the weight of the edges on the shortest path connecting those nodes. 

Formally, you are given a tree with weighted edges, but whose weights are unknown. The value of a path between two nodes A and B is defined as: 

&nbsp; &nbsp; &nbsp; &nbsp; value(A,B) = XOR of the weight of the edges on the shortest path from A to B. 

You are given the values of M paths. You have to determine how many different possible assignments of weights will satisfy the given information. 

If no assignment satisfying the given constraints exist then print "Zero". If more than one assignment satisfies the given constraints then print "Multiple". If only a unique solution exists, print "One" on the first line and print the XOR of the square of the edge weights on the next line.The first line of the input contains two space-separated integers N and M — the number of vertices in the tree and the number of paths whose values are given.
Then N-1 lines follow, the i<sup>th</sup> line contains two space-separated integers X<sub>i</sub> and Y<sub>i</sub> representing an edge between them.
Then M lines follow, the i<sup>th</sup> line contains three space-separated integers A<sub>i</sub>, B<sub>i</sub> and C<sub>i</sub> — the value of the path from A<sub>i</sub> to  B<sub>i</sub> being  C<sub>i</sub>.

<b> Constraints: </b>
2 ≤ N ≤ 10<sup>5</sup>
1 ≤ M ≤ 2×10<sup>5</sup>
1 ≤ X<sub>i</sub>, Y<sub>i</sub> ≤ N, (X<sub>i</sub> &#8800; Y<sub>i</sub>)
1 ≤ A<sub>i</sub>, B<sub>i</sub> ≤ N,  (A<sub>i</sub> &#8800; B<sub>i</sub>)
0 ≤ C<sub>i</sub> < 2<sup>16</sup>If no assignment satisfying the given constraints exist, print "Zero".
If more than one assignment satisfies the given constraints, print "Multiple". 
If only a unique solution exists, print "One" on the first line and print the XOR of the square of the edge weights on the next line.Sample Input 1:
2 1
1 2
2 1 3
Sample Output 1:
One
9

Sample Explanation 1:
Only a single weight can be assigned to the given edge with weight equal to 3.
The square of the edge weight is 9, as there is only a single edge so the value of the XOR of squares is also equal to 9.

Sample Input 2:
4 3
1 2
2 4
1 3
1 4 3
2 4 2
2 3 5
Sample Output 2:
One
21

Sample Explanation 2:
The only possible assignment of weights is:
weight of (1, 2) = 1, weight of (2, 4) = 2, weight of (1, 3) = 4
Thus, the XOR of their squares is (1^4^16) = 21.

Sample Input 3:
3 1
1 2
2 3
1 3 5
Sample Output 3:
Multiple

Sample Explanation 3:
There can be multiple solutions satisfying the given input.
One possible solution is (1, 2) = 0 and (2, 3) = 5 and another possible solution is (1, 2) = 1 and (2, 3) = 4.
 , I have written this Solution Code: #include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<iostream>

#define lowbit(x) ((x)&(-x))
#define Finline __inline__ __attribute__ ((always_inline))
#define DEBUG printf("Running on Line %d in Function %s\n",__LINE__,__FUNCTION__)

typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;

const int inf=0x3f3f3f3f,Inf=0x7fffffff;
const ll INF=0x7fffffffffffffff;
const double eps=1e-10;

uint seed=19260817;
const uint _RAND_MAX_=4294967295u;
Finline uint Rand(){return seed=seed*998244353u+1000000007u;}

template <typename _Tp>_Tp gcd(const _Tp &a,const _Tp &b){return (!b)?a:gcd(b,a%b);}
template <typename _Tp>Finline _Tp abs(const _Tp &a){return a>0?a:-a;}
template <typename _Tp>Finline _Tp max(const _Tp &a,const _Tp &b){return a<b?b:a;}
template <typename _Tp>Finline _Tp min(const _Tp &a,const _Tp &b){return a<b?a:b;}
template <typename _Tp>Finline void chmax(_Tp &a,const _Tp &b){(a<b)&&(a=b);}
template <typename _Tp>Finline void chmin(_Tp &a,const _Tp &b){(a>b)&&(a=b);}
template <typename _Tp>Finline bool _cmp(const _Tp &a,const _Tp &b){return abs(a-b)<=eps;}
template <typename _Tp>Finline void read(_Tp& x)
{
    register char ch(getchar());
    bool f(false);
    while(ch<48||ch>57) f|=ch==45,ch=getchar();
    x=ch&15,ch=getchar();
    while(ch>=48&&ch<=57) x=(((x<<2)+x)<<1)+(ch&15),ch=getchar();
    if(f) x=-x;
}
template <typename _Tp,typename... Args>Finline void read(_Tp &t,Args &...args)
{
    read(t);read(args...);
}
Finline int read_str(char *s)
{
    register char ch(getchar());
    while(ch==' '||ch=='\r'||ch=='\n') ch=getchar();
    register char *tar=s;
    *tar=ch,ch=getchar();
    while(ch!=' '&&ch!='\r'&&ch!='\n'&&ch!=EOF) *(++tar)=ch,ch=getchar();
    return tar-s+1;
}

const int N=100005;
Finline int id(const int &x,const int &y,const int &z)
{
	return 32*(x-1)+z*16+y+1;
}
struct edge{
	int v,nxt;
}c[N<<1];
int front[N],cnt;
Finline void add(const int &u,const int &v)
{
	c[++cnt]=(edge){v,front[u]},front[u]=cnt;
}
int s[N];

long long int gans = 0;

int minn,maxx;
void dfs(int x,int fa)
{
	for(int i=front[x];i;i=c[i].nxt)
	{
		if(c[i].v!=fa)
		{
			gans ^= 1LL*(s[x] ^s[c[i].v]) * 1LL*(s[x] ^s[c[i].v]);
			chmin(minn,s[x]^s[c[i].v]);
			chmax(maxx,s[x]^s[c[i].v]);
			dfs(c[i].v,x);
		}
	}
}
int fa[N<<5];
int find(const int &x){return x==fa[x]?x:fa[x]=find(fa[x]);}
void MAIN()
{
	minn=inf,maxx=0;
	int n,m;
	read(n,m);
	memset(front,0,4*(n+3));
	cnt=0;
	memset(s,0,4*(n+3));
	int x,y,z;
	for(int i=1;i<n;++i)
	{
		read(x,y);
		add(x,y),add(y,x);
	}
	for(int i=1;i<=n*32;++i) fa[i]=i;
	for(int i=1;i<=m;++i)
	{
		read(x,y,z);
		for(int j=0;j<16;++j)
		{
			if((z>>j)&1)
			{
				if(find(id(x,j,1))==find(id(y,j,0))&&find(id(x,j,0))==find(id(y,j,1)))
				{
					continue;
				}
				fa[find(id(x,j,1))]=find(id(y,j,0));
				fa[find(id(x,j,0))]=find(id(y,j,1));
			}
			else
			{
				if(find(id(x,j,0))==find(id(y,j,0))&&find(id(x,j,1))==find(id(y,j,1)))
				{
					continue;
				}
				fa[find(id(x,j,0))]=find(id(y,j,0));
				fa[find(id(x,j,1))]=find(id(y,j,1));
			}
		}
	}
	for(int i=1;i<=n;++i)
	{
		for(int j=0;j<16;++j)
		{
			if(find(id(i,j,0))==find(id(i,j,1)))
			{
				printf("Zero\n");
				return;
			}
		}
	}
	for(int j=0;j<16;++j)
	{
		int cnt=0,tmp;
		for(int i=1;i<=n;++i)
		{
			if(find(id(i,j,0))==id(i,j,0))
			{
				tmp=id(i,j,0);
				++cnt;
			}
			if(find(id(i,j,1))==id(i,j,1))
			{
				tmp=id(i,j,1);
				++cnt;
			}
		}
		if(cnt>2)
		{
			printf("Multiple\n");
			return;
		}
		for(int i=1;i<=n;++i)
		{
			if(find(id(i,j,1))==tmp)
			{
				s[i]^=1<<j;
			}
		}

	}


	gans = 0;
	dfs(1,0);
	printf("One\n");
	printf("%Ild\n",gans);
}
int main()
{
	int _ = 1;
	while(_--) MAIN();
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?