当前位置:网站首页>bzoj3262 Flowers bloom on Mo
bzoj3262 Flowers bloom on Mo
2022-08-08 15:14:00 【51CTO】
http://www.elijahqi.win/2018/03/08/bzoj3262/
Description
有n朵花,每朵花有三个属性:花形(s)、颜色(c)、气味(m),用三个整数表示.
现在要对每朵花评级,一朵花的级别是它拥有的美丽能超过的花的数量.
定义一朵花A比另一朵花B要美丽,当且仅Sa>=Sb,Ca>=Cb,Ma>=Mb.
显然,两朵花可能有同样的属性.需要统计出评出每个等级的花的数量.
Input
第一行为N,K (1 <= N <= 100,000, 1 <= K <= 200,000 ), 分别表示花的数量和最大属性值.
以下N行,每行三个整数si, ci, mi (1 <= si, ci, mi <= K),表示第i朵花的属性
Output
包含N行,分别表示评级为0…N-1的每级花的数量.
Sample Input
10 3
3 3 3
2 3 3
2 3 1
3 1 1
3 1 2
1 3 1
1 1 2
1 2 2
1 3 2
1 2 1
Sample Output
3
1
3
0
1
0
1
0
0
1
splay+树状数组 for the first dimension 排序 for the second dimension Make a tree-like array For the third dimension in eachsplaymaintain something 每次log^2查询即可 Watch out for repetition Pack them up
cdq分治 Pay attention to packaging and sorting details
边栏推荐
猜你喜欢
随机推荐
【控制】动力学建模举例 --> 牛顿-欧拉法
什么是低代码开发?大家都真的看好低代码开发吗?
Zhaoqi Technology Innovation and Entrepreneurship Event Event Platform, Investment and Financing Matchmaking, Online Live Roadshow
连这几个网站都不知道,怪不得你的消息比别人落后
掌握财富密码,运维需要了解这些技术
查询接口 - 树形菜单查询接口实现
sqllabs 1~6通关详解
表实时同步,没有etl 可以用这个吗,从mysql到mysql
JS-Bom-while(计算闰年)
JS-Bom-while (calculate leap year)
【Unity入门计划】用双血条方法控制伤害区域减血速度
Install Update(Patches) on ESXi
What is low-code development?Is everyone really optimistic about low-code development?
AD添加LOGO
bzoj3262 陌上花开
领域驱动设计系列贫血模型和充血模型
消除游戏中宝石下落的原理和实现
MySQL:Update高并发下变慢的案例及其涉及的特性
sqoop连接MySQL跟本机不一致是为什么
进程和线程