#include using namespace std; int N,X[5050],A[5050]; int XOR[5050][5050]; long dp[5050]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin>>N; for(int i=0;i>X[i]; for(int i=0;i>A[i]; for(int l=0;l