ll@N,@M,@K;char@O;ll@B[M],@A[N];sort(A,A+N),sort(B,B+M);wt(O&1?N*M-sum[ll][i,0,N](lower_bound(B,B+M,K-A[i])-B):N*M-sum[ll][i,0,N](lower_bound(B,B+M,(K+A[i]-1)/A[i])-B));