#P3769. [CH弱省胡策R2] TATT
[CH弱省胡策R2] TATT
Description
Four-dimensional space is truly wonderful. Now there are points in four-dimensional space. Find a longest path such that, along the path, each coordinate in every dimension is monotonically non-decreasing.
Note that the starting point of the path can be chosen arbitrarily, and the path is independent of the input order (the order along the path does not need to be increasing in the input).
The length of a path is the number of points visited, and any point can be visited at most once.
Input Format
The first line contains an integer . The next lines each contain four integers , representing a 4D coordinate.
Output Format
Output one integer in a single line, the length of a longest path.
4
2 3 33 2333
2 3 33 2333
2 3 33 2333
2 3 33 2333
4
Hint
Let . | Test point index | | | Special note | | :----------: | :----------: | :----------: | :----------: | | | | | | | | | | | | | | | The 3rd and 4th coordinates of all points are the same | | | | | The 4th coordinate of all points is the same | | | | | | | | | | |
Translated by ChatGPT 5
京公网安备 11011102002149号