
数据结构
穆林幕
做个苦行僧!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
RMQ-ST算法 (hihocoder #1068)
RMQ-ST算法原创 2015-05-01 09:41:58 · 506 阅读 · 0 评论 -
How do I print out a tree structure?
How do I print out a tree structure? http://stackoverflow.com/questions/1649027/how-do-i-print-out-a-tree-structure多谢熊神给的链接,圆满的解决了我的问题。语法树本来自己写的丑的不忍直视。。现在好看多了,哈哈其中最短小精悍的是节点中打印连线,很棒。 class Node {转载 2015-05-17 22:19:24 · 457 阅读 · 0 评论 -
[CF310]D. Case of Fugitive
题意: 给出n个线段,在n个线段之间搭桥,给出m个桥的长度,假如满足条件 To reach the goal, Andrewid needs to place a bridge between each pair of adjacent islands. A bridge of length a can be placed between the i-th and the (i + 1)-th原创 2015-06-30 13:12:57 · 1097 阅读 · 0 评论 -
[STL]hdu5233
题意: 给出一组数据n个数,m个询问q,问最近的q的输入下标是多少?分析: 首先数据量比较大100000,查询的话肯定要用些技巧,刚开始想的是二分查询,用set,可是不知道set里放数据结构struct如何按照关键字lower_bound()。后来看了官方题解,先把数据离散话,然后利用set[]来存储下标。那么输出的时候就直接输出begin,删除也可以erase(). 这里有个trick,刚开原创 2015-05-24 07:37:42 · 1116 阅读 · 1 评论 -
[RMQ]UVa 11235 - Frequent values
题意: 给出一串非减的序列,然后查询L,R区间内个数最多的有多少个?分析: 按照大白的分析写的。#include <iostream> #include <stdio.h> #include <cstring> #include <algorithm> #include <set> #include <map> #include <stack> #include <vect原创 2015-10-11 00:12:02 · 592 阅读 · 0 评论