UVa 437 — The Tower of Babylon

于子軒
1 min readDec 24, 2017

--

LIS

Problem : 437 — The Tower of Babylon

Hints

  1. Every block with ( x, y, z ) can be map to six different blocks
    ( x, y, z )
    ( y, x, z )
    ( x, z, y )
    ( z, x, y )
    ( y, z, x )
    ( z, y, x )
  2. Push all these blocks into vector
  3. Sort
  4. LIS ( carefully check your comparison)

p.s. tuple is so cool 😍 😍 😍

code

--

--

于子軒

我想寫帥氣又厭世的自介但寫不出來https://geniustanley.github.io/