【NOIP2018模拟赛2018.10.22】cards

题目 题解 – 这道题只有特判呢 对于前8个点,发现只要x从小到大排好序,就是求y的lca,用树桩数组优化一下就好了 对于后2个点,只要pi<=pj,我们就连一条有向边,最后跑最长路就好 代码 #include<iostream> #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<algori
相关文章
相关标签/搜索