偏序问题
偏序问题
_Shmily
这个作者很懒,什么都没留下…
展开
-
P3810 【模板】三维偏序(陌上花开)
题目连接 题面: 代码: //因为相等的也算,所以要去重且统计相等的有多少个 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #include<string> #include<queue> #define ll long long #define llu unsigned ll using原创 2020-08-24 22:25:22 · 79 阅读 · 0 评论 -
2020 年 “游族杯” 全国高校程序设计网络挑战赛 C. Coronavirus Battle (三维偏序,树套树)
题目链接 题面: 题意: 给定点 a ( x , y , z ) , 问符合要求的点 b( xx , yy , zz)的dp最大值,设这个dp最大值为dp [ x ],那么当前点 a的dp [ a ] = dp [ x ] + 1。 若没有符合要求的点,那么 dp [ a ] = 0。 其中点b符合要求是指 xx<=x && yy<=y && zz<=z 且 (xx < x , yy < y , zz<z)之中至少有一个成立。 这里的点原创 2020-08-24 22:12:04 · 168 阅读 · 0 评论 -
The Preliminary Contest for ICPC Asia Xuzhou 2019:I. query(二维偏序):
很早就开的一道题目,然而一直被卡爆了。 知道这样的点对有 nlogn对,但是没有转换成二维偏序问题。 而是用主席树保存了所有的历史状态,空间复杂度nlognlogn直接爆掉。 转换成二维偏序问题就很好做了。 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm>...原创 2020-08-24 20:57:38 · 238 阅读 · 1 评论