CF1423I Lookup Tables
Description
John wants to make his implementation of F fast so he has decided to use lookup tables. A single $ 2K $ -bit lookup table would be too large to fit in memory, so instead John plans to use two K-bit lookup tables, LSBTable and MSBTable. His implementation will look like this: $ $ F(x) = \textrm{LSBTable}[\textrm{lowKBits}(x)] \; \& \; \textrm{MSBTable}[\textrm{highKBits}(x)] $ $ In other words it returns the "bitwise and" of results of looking up the K least significant bits in LSBTable and the K most significant bits in MSBTable.
John needs your help. Given $ K $ , $ Q $ and $ Q $ intervals $ \[l\_i, r\_i\] $ and values $ v\_i$$$, find any two lookup tables which can implement F or report that such tables don't exist.