
离散化
csu_xiji
这个作者很懒,什么都没留下…
展开
-
计蒜客 ACM-ICPC 2018 焦作赛区网络预赛 Modular Production Line 费用流
https://nanti.jisuanke.com/t/A2016思路:和这道题基本上一样:https://blog.youkuaiyun.com/xiji333/article/details/104010374唯一的区别就是区间从左闭右开变成了左右均闭,在处理的时候把右端点+1+1+1就好了。#include<cstdio>#include<cstring>#incl...原创 2020-01-16 20:55:46 · 167 阅读 · 0 评论 -
POJ 3680 Intervals 费用流
http://poj.org/problem?id=3680题目大意:给nnn个开区间,每一个区间都有对应的权值,让你从这nnn个区间中任意选取若干个区间,使得权值之和最大且在实数轴上每个整数被覆盖的次数<=k<=k<=k,输出这个最大的权值。思路:费用流,这玩意第一次见真的头大。下面这个解释我觉得还行,然后补充一下细节,区间左端点向右端点连的边的权值是−wi-w_i−wi...原创 2020-01-16 20:09:33 · 206 阅读 · 0 评论 -
离散化
什么是离散化:离散化,把无限空间中有限的个体映射到有限的空间中去,以此提高算法的时空效率。再通俗一点:离散化是在不改变数据相对大小的条件下,对数据进行相应的缩小。概述:离散化是程序设计中一个常用的技巧,它可以有效的降低时间复杂度。其基本思想就是在众多可能的情况中,只考虑需要用的值。离散化可以改进一个低效的算法,甚至实现根本不可能实现的算法。要掌握这个思想,必须从大量的题目中理解...原创 2019-03-02 12:14:47 · 18750 阅读 · 0 评论 -
POJ 2528 离散化+线段树
http://poj.org/problem?id=2528The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim...原创 2019-03-02 14:19:59 · 188 阅读 · 0 评论 -
POJ 2299 求逆序数 归并排序||离散化&权值树状数组
http://poj.org/problem?id=2299In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence element...原创 2019-03-09 16:10:51 · 188 阅读 · 0 评论 -
HDU 6318 逆序数
http://acm.hdu.edu.cn/showproblem.php?pid=6318Long long ago, there was an integer sequence a.Tonyfang think this sequence is messy, so he will count the number of inversions in this sequence. Becau...原创 2019-03-09 16:19:27 · 326 阅读 · 0 评论 -
codeforces 1199C MP3
http://codeforces.com/problemset/problem/1199/COne common way of digitalizing sound is to record sound intensity at particular time moments. For each time moment intensity is recorded as a non-negati...原创 2019-09-04 14:39:05 · 310 阅读 · 0 评论