The mess in the title seems to be a persistent linear basis;
However~
One formula to do everything: a^b<=a+b
Then XORing all numbers is the answer;
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; long long ans=0; for(register int i=1;i<=n;i++){ int tmp; scanf("%d",&tmp); ans^=tmp; } cout << years; }
Reprinted in: https://www.cnblogs.com/kamimxr/p/11590347.html