#include <iostream> #include <bitset> using namespace std; int main() { bitset<2000> forA; bitset<2000> forB; int p, q, l, r; while(cin >> p >> q >> l >> r){ int start, end; for(int i = 0; i < p; ++i){ ci...