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