P3810 【模板】三维偏序(陌上花开)

本文详细介绍了P3810题目,探讨了三维偏序的概念及其解决思路。通过具体的题面分析,提供了一种通用的解决方案,并给出了完整的代码实现。
摘要由CSDN通过智能技术生成

题目连接

题面:
在这里插入图片描述

代码:

//因为相等的也算,所以要去重且统计相等的有多少个
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<string>
#include<queue>
#define ll long long
#define llu unsigned ll
using namespace std;
const int maxn=200100;
struct node
{
   
    int x,y,z;
    int cnt,ans,id;
    bool operator == (const node &b)
    {
   
        return x==b.x&&y==b.y&&z==b.z;
    }
}a[maxn];
bool cmp1(const node &a,const node &b)
{
   
    if(a.x!=b.x) return a.x<b.x;
    if(
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值