
2-SAT
2-SAT
_sky123_
这个作者很懒,什么都没留下…
展开
-
Columns Swaps
You are given a table a of size 2×n2×n2×n (i.e. two rows and n columns) consisting of integers from 111 to nnn. In one move, you can choose some column jjj (1≤j≤n)(1≤j≤n)(1≤j≤n) and swap values a1,ja_{1,j}a1,j and a2,ja_{2,j}a2,j in it. Each column can b原创 2020-08-11 23:54:01 · 781 阅读 · 0 评论 -
Illumination
You inherited a haunted house. Its floor plan is an nnn-by-nnn square grid with lll lamps in fixedlocations and no interior walls. Each lamp can either illuminate its row or its column, but not bothsimultaneously. The illumination of each lamp extends by r原创 2020-06-20 19:12:07 · 397 阅读 · 0 评论