随笔分类 - 数据结构
摘要:题目链接: Sum of Medians Time Limit:3000MSMemory Limit:262144KB 问题描述 In one well known algorithm of finding the k th order statistics we should divide all
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=3333" Turing Tree Time Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) 问题描
阅读全文
摘要:题目链接: "http://acm.hust.edu.cn/vjudge/contest/122094 problem/H" Frosh Week Time Limit:8000MSMemory Limit:0KB 问题描述 During Frosh Week, students play vari
阅读全文
摘要:题目链接: 题目 "E. George and Cards" time limit per test:2 seconds memory limit per test:256 megabytes 问题描述 George is a cat, so he loves playing very much.
阅读全文
摘要:题目链接: 题目 "I. Approximating a Constant Range" time limit per test:2 seconds memory limit per test:256 megabytes 问题描述 When Xellos was doing a practice c
阅读全文
摘要:题目链接: 题目 "Problem 1016 咒文卷轴" Time Limit: 3000 mSec Memory Limit : 131072 KB 问题描述 小Y 是一个魔法师,有一天他获得了一卷神秘而古老的咒文卷轴,其由N个咒文构成,每一个咒文都有一个威力值ai, 现在小Y可以借助该卷轴释放强
阅读全文
摘要:题目链接: 题目 "Problem 1007 幸运数" Time Limit: 2000 mSec Memory Limit : 131072 KB 问题描述 皮特的幸运数是2和5。只由幸运数字2和5组成的数列,称为幸运数列。对于幸运数列,有两种操作。 1、switch i j 表示数列从第i个数到
阅读全文
摘要:题目链接: 题目 "Assign the task" Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) 问题描述 There is a company that has N employ
阅读全文
摘要:题目链接: 题目 "D. Kay and Snowflake" time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output 问题描述 Aft
阅读全文
摘要:题目链接: http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=13013 题意: 给你一颗树,现在有两个操作,一种是改变某条边的权值,一种是查询点u到v之间的路径的最大边权。 题解: 树链剖分入门题。 我看的一些博客: http:
阅读全文
摘要:题目链接: http://codeforces.com/contest/675/problem/D 题意: 给你一系列点,叫你构造二叉搜索树,并且按输入顺序输出除根节点以外的所有节点的父亲。 题解: n有10^5,如果直接去建树,最会情况会O(n^2)t掉。 因此我们需要利用一些二叉搜索树的性质:
阅读全文
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5592 题意: http://bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=654&pid=1003 题解: 对给的n个数做差
阅读全文
摘要:题目链接: hdu: http://acm.hdu.edu.cn/showproblem.php?pid=5172 bc(中文): http://bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=567&pid=1003 题解:
阅读全文
摘要:题目链接: hdu: http://acm.hdu.edu.cn/showproblem.php?pid=1754 题解: 单点更新,成段查询。 代码:
阅读全文
摘要:题目链接: poj: http://poj.org/problem?id=3468 题意: 成段更新,成段查询。 代码:
阅读全文
摘要:题目链接: hdu:http://acm.hdu.edu.cn/showproblem.php?pid=1166 题意: 单点更新,成段查询。
阅读全文
摘要:题目链接: http://poj.org/problem?id=1330 题意: 给你一颗有根树,最后输入一对数(a,b),叫你求a和b的公共祖先。 裸的lca,数据也很小,拿来练手不错。 题解: 1、tarjan_lca,离线,线性时间复杂度 代码: 1 #include<iostream> 2
阅读全文
摘要:题目链接: hdu:http://acm.hdu.edu.cn/showproblem.php?pid=5269 bc:http://bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=603&pid=1002 题解: (以下有提
阅读全文
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5465 Clarke and puzzle Accepts: 42 Submissions: 269 Time Limit: 4000/2000 MS (Java/Others) Memory Limi
阅读全文

浙公网安备 33010602011771号