
====数据结构====
剑锋OI
文艺青年还是正高教授,我自己也分不清了呀。
展开
-
HDU 5638 Toposort 拓扑排序 优先队列
时间限制:1S / 空间限制:256MB 【在线测试提交传送门】【问题描述】 There is a directed acyclic graph with n vertices and m edges. You are allowed to delete exact k edges in such way that the lexicographically minimal topolog翻译 2017-11-06 19:57:00 · 407 阅读 · 1 评论 -
【Bzoj1179】[Apio2009]抢掠计划atm
时间限制:1S / 空间限制:256MB 【在线测试提交传送门】【问题描述】 【输入格式】第一行包含两个整数N、M。N表示路口的个数,M表示道路条数。接下来M行,每行两个整数,这两个整数都在1到N之间,第i+1行的两个整数表示第i条道路的起点和终点的路口编号。接下来原创 2017-11-08 14:56:20 · 313 阅读 · 0 评论 -
莫队算法及应用
该文章非原创,原创地址为:https://www.cnblogs.com/Paul-Guderian/p/6933799.html莫队算法·目前的题型概括为三种:普通莫队,树形莫队以及带修莫队。若谈及入门,那么BZOJ2038的美妙袜子一题堪称顶尖。【例题一】袜子 传输门·述大意: 进行区间询问[l,r],输出该区间内随机抽两次抽到相同颜色袜子的概率...转载 2017-11-08 21:26:19 · 550 阅读 · 0 评论 -
Hdu 1394 Minimum Inversion Number
≤,≠,≥<> 时间限制:1S / 空间限制:256MB 【在线测试提交传送门】【问题描述】 The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.For a given sequence of number翻译 2017-11-09 10:22:56 · 441 阅读 · 0 评论 -
Bzoj4989 [Usaco2017 Feb]Why Did the Cow Cross the Road
时间限制:1S / 空间限制:256MB 【在线测试提交传送门】【问题描述】 Why did the cow cross the road? We may never know the full reason, but it is certain that Farmer John's cows do end up crossing the road quite frequently. In翻译 2017-11-09 15:14:15 · 431 阅读 · 0 评论 -
C++ STL set容器常用用法
本文系转载,原创请移步:http://blog.youkuaiyun.com/cerberux/article/details/51774121set是STL中一种标准关联容器。它底层使用平衡的搜索树——红黑树实现,插入删除操作时仅仅需要指针操作节点即可完成,不涉及到内存移动和拷贝,所以效率比较高。set,顾名思义是“集合”的意思,在set中元素都是唯一的,而且默认情况下会对元素自动进行升序排列,支持集合的交(转载 2017-11-10 09:09:16 · 346 阅读 · 0 评论 -
Hdu 5792 World is Exploding
≤,≠,≥<> 时间限制:1S / 空间限制:256MB 【在线测试提交传送门】【问题描述】 Given a sequence A with length n,count how many quadruple (a,b,c,d) satisfies: a≠b≠c≠d,1≤a【输入格式】The input consists of multiple test cases. Each t翻译 2017-11-09 20:03:08 · 301 阅读 · 0 评论 -
BZOJ 1029: [JSOI2007]建筑抢修 优先队列
本文系转载,原创请访问:http://www.cnblogs.com/qscqesze/p/4381727.html1029: [JSOI2007]建筑抢修Time Limit: 4 Sec Memory Limit: 162 MB题目连接http://www.lydsy.com/JudgeOnline/problem.php?id=1029Descripti转载 2017-11-03 14:39:25 · 255 阅读 · 0 评论