# 题目大意

$1\leq n\leq4\times10^5$

# 题目分析

HackerRank居然出论文题。

# 参考文献

Guan-Yu Lin, Jia-Jie Liu, and Yue-Li Wang, Finding a Longest Increasing Subsequence from the Paths in a Complete Bipartite Graph