![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
离散化
文章平均质量分 92
qq_37383726
这个作者很懒,什么都没留下…
展开
-
【牛客OI周赛15-普及组】 A【模拟】B【DP】D【离散化+DP+树状数组】
比赛连接文章目录ABDA问题:长度为n的字符串,是否完全由多个mq连接组成思路:模拟就型了。#include <bits/stdc++.h>using namespace std;typedef long long ll;typedef pair<int, int> pii;const int N = 1e5 + 11;const int M = 1...原创 2020-04-04 18:48:35 · 208 阅读 · 0 评论 -
【L2-007.】 家庭房产 【离散化+DFS】
给定每个人的家庭成员和其自己名下的房产,请你统计出每个家庭的人口数、人均房产面积及房产套数。输入格式:输入第一行给出一个正整数N(<=1000),随后N行,每行按下列格式给出一个人的房产:编号 父 母 k 孩子1 … 孩子k 房产套数 总面积其中 编号 是每个人独有的一个4位数的编号;父 和 母 分别是该编号对应的这个人的父母的编号(如果已经过世,则显示-1);k(0<...原创 2018-03-26 20:01:29 · 315 阅读 · 0 评论 -
【POJ - 332】Jessica's Reading Problem 【离散化+尺取法】
Jessica’s a very lovely girl wooed by lots of boys. Recently she has a problem. The final exam is coming, yet she has spent little time on it. If she wants to pass it, she has to master all ideas incl...原创 2018-02-21 11:57:04 · 125 阅读 · 0 评论 -
【2017年浙江工业大学大学生程序设计迎新赛决赛】D 序列 【离散化+分块+莫队】
时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 读入一个长度为n的整数数列a1,a2,…,an,以及一个整数K。 q组询问。 每组询问包含一个二元组(l, r), 其中1≤l≤r≤ n, 求所有满足以下条件的二元组(l2, r2)的数目: 1: 1≤l≤l2≤r2≤r≤n,原创 2017-12-28 14:49:14 · 277 阅读 · 0 评论 -
【POJ - 2528】Mayor's posters 【离散化+线段树 】
The 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. The city council has finally de原创 2017-10-26 22:27:15 · 189 阅读 · 0 评论 -
【SPOJ - COT】Count on a tree 【主席树 求静态树上第k大】
You are given a tree with N nodes. The tree nodes are numbered from 1 to N. Each node has an integer weight.We will ask you to perform the following operation:u v k : ask for the kth minimum weight on原创 2017-11-02 18:28:14 · 223 阅读 · 0 评论 -
【POJ - 2761】Feed the dogs 【主席树 求静态区间第k大】
Wind loves pretty dogs very much, and she has n pet dogs. So Jiajia has to feed the dogs every day for Wind. Jiajia loves Wind, but not the dogs, so Jiajia use a special way to feed the dogs. At luncht原创 2017-11-02 13:20:51 · 251 阅读 · 0 评论 -
【POJ - 2104】K-th Number 【主席树 求静态区间第k大】
You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able to return quick原创 2017-11-02 13:51:55 · 186 阅读 · 0 评论 -
【HDU - 4325 】Flowers 【树状数组+离散化】
As is known to all, the blooming time and duration varies between different kinds of flowers. Now there is a garden planted full of flowers. The gardener wants to know how many flowers will bloom in th原创 2017-10-19 18:18:28 · 270 阅读 · 0 评论 -
【HDU - 5124】 lines 【树状数组+离散化】
John has several lines. The lines are covered on the X axis. Let A is a point which is covered by the most lines. John wants to know how many lines cover A. Input The first line contains a single int原创 2017-10-19 18:39:40 · 191 阅读 · 0 评论 -
【CodeForces - 652D】Nested Segment 【树状数组+离散化】
You are given n segments on a line. There are no ends of some segments that coincide. For each segment find the number of segments it contains.Input The first line contains a single integer n (1 ≤ n ≤原创 2017-10-19 16:56:35 · 222 阅读 · 0 评论