#include <cstdio>
using namespace std;
#define ull unsigned long long
const int NR = 1e6 + 10;
ull a[NR], s[NR];
int main()
{
int n, top = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++) scanf("%llu", &a[i]);
ull ans = 0;
for (int i = 1; i <= n; i++)
{
while (top && a[s[top]] <= a[i]) ans ^= a[s[top--]];
s[++top] = i;
ans ^= s[top];
printf("%llu\n", ans);
}
return 0;
}
现在连 22 行代码都调不了了,有问题喊我