#include #include #include using namespace std; using namespace atcoder; using mint = modint1000000007; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001 int n,m; void go(vector> a,map &mp){ int mm = a.size(); rep(i,1<>j)&1){ B ^= 1LL<>n>>m; vector> a,b; rep(i,m){ int x,y; cin>>x>>y; x--,y--; if(a.size()<20){ a.emplace_back(x,y); } else{ b.emplace_back(x,y); } } map mp1,mp2; go(a,mp1); go(b,mp2); long long c = 0; rep(i,n){ int t; cin>>t; if(t)c |= 1LL<