In a four-dimensional space, there are n points xi=(ai,bi,ci,di). Itβs possible to move from point xi to point xj if aiβ€aj, biβ€bj, ciβ€cj, and diβ€dj. Find the longest path passing through each point at most once. You can start from any point.
Input:
3
2 3 4 4
1 2 3 4
2 2 1 3
Output:
2
Product | |
Big board | |
Segment queries | |
xor xor xor | |
Coins flip | |
Slimes | |
4D longest path | |
Good subarray | |
Shortest path on grid | |
Dynamic MST |