#include using namespace std; #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") using ll=long long; int main(){ int N,F;cin>>N>>F; bitset<900001> bs; vector A(N),B(N),C(N); for(auto&&e:A)cin>>e; for(auto&&e:B)cin>>e; for(auto&&e:C)cin>>e; bs.set(0,1); for(int i=0;i