离散化
eazo
这个作者很懒,什么都没留下…
展开
-
2020 年 “游族杯” 全国高校程序设计网络挑战赛 Coronavirus Battle(cdq分治+离散化)
题意 对每个三维点(x,y,z),只有在这个单位时间存在一个点位于(x’,y’,z’) { x’<x && y’<y && z’<z}时,这个点才能在这个单位时间存活,求每个点的存活时间 思路 对z轴进行离散化,然后对整体进行cdq分治,求每个点之后有几个点 代码实现 #pragma GCC optimize(3,"Ofast","inline") #include<bits/stdc++.h> using namespace std; type原创 2020-05-24 18:11:22 · 250 阅读 · 0 评论 -
Moving Points(树状数组)
There are n points on a coordinate axis OX. The i-th point is located at the integer point xi and has a speed vi. It is guaranteed that no two points occupy the same coordinate. All n points move with...原创 2020-02-25 14:22:06 · 456 阅读 · 0 评论 -
哈希及离散化学习笔记
哈希概念 散列函数,又称散列算法、哈希函数,是一种从任何一种数据中创建小的数字“指纹”的方法。 散列函数把消息或数据压缩成摘要,使得数据量变小,将数据的格式固定下来。 散列表,也叫哈希表,是根据键(Key)而直接访问在内存存储位置的数据结构。 哈希——通过一种计算使得范围较大的数据对应(映射)到一个较小的范围中,计算得到的就是键值 哈希函数——某一种计算方式(函数) 哈希表——存储数据的数据结构。...转载 2019-01-23 14:16:12 · 1967 阅读 · 0 评论