#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<set>
#include<algorithm>
#include<map>
#include<vector>
#include<queue>
#include<iostream>
#include<string>
#include<cmath>
#define B 30
#define N 100010
#define FOR(i,a,b) for(i=(a);i<=(b);i++)
#define ROF(i,a,b) for(i=(a);i>=(b);i--)
typedef long long LL;
using namespace std;
LL Or,And,Xor,tor,tand,txor;
int n,back[B][N],len[B][N],nxt[B][N],bit[N][B];
int main()
{
scanf("%d",&n);
int bitL=0,i,j;
FOR(i,1,n)
{
int tt;
scanf("%d",&tt);
int tmp=tt;
while (tmp)
...
Read more »