typedef bitset<10000> B; ll@(n,u,h,w); unordered_map m; rep(i,n){ ll inc=i