上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 22 下一页
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1890 Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Descripti 阅读全文
posted @ 2018-08-01 12:00 Dilthey 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4029 Time Limit: 1 Second Memory Limit: 131072 KB AC代码: 阅读全文
posted @ 2018-07-30 15:47 Dilthey 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.nowcoder.com/acm/contest/141/C 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K Special Judge, 64bit IO Format: %lld 时间限制:C/C++ 1秒 阅读全文
posted @ 2018-07-30 15:43 Dilthey 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 目录 1 简介 2 基础操作 2.1 旋转 2.2 伸展操作 3 常规操作 3.1 插入操作 3.2 删除操作 3.3 查找操作 3.4 查找某数的排名、查找某排名的数 3.4.1 查找某数的排名 3.4.2 查找某排名的数 4 代码实现 5 经典应用 - 区间添加、删除、翻转 5.1 区间添加 5 阅读全文
posted @ 2018-07-27 21:11 Dilthey 阅读(1809) 评论(1) 推荐(1) 编辑
摘要: 题目链接:https://www.nowcoder.com/acm/contest/141/A 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K Special Judge, 64bit IO Format: %lld 题目描述 Eddy was 阅读全文
posted @ 2018-07-26 15:14 Dilthey 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.nowcoder.com/acm/contest/141/H 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/ 阅读全文
posted @ 2018-07-26 13:31 Dilthey 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6312 Problem Description Alice and Bob are playing a game.The game is played on a set of positive integ 阅读全文
posted @ 2018-07-26 11:00 Dilthey 阅读(560) 评论(0) 推荐(0) 编辑
摘要: 题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=6318 Problem Description Long long ago, there was an integer sequence a.Tonyfang think this sequence is 阅读全文
posted @ 2018-07-26 02:44 Dilthey 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.nowcoder.com/acm/contest/140/J 时间限制:C/C++ 4秒,其他语言8秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 时间限制:C/C++ 4秒,其他语言8秒 空间限制:C/ 阅读全文
posted @ 2018-07-26 00:51 Dilthey 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 目录: ① 单点修改、区间查询 树状数组 原理 ② 区间查询、单点修改 树状数组 ③ 区间查询、区间修改 树状数组 ④ 二维树状数组 单点修改、区间查询 二维树状数组 区间修改、单点查询 二维树状数组 区间修改、区间查询 二维树状数组 ①单点修改、区间查询BIT: 首先当然是最基础的树状数组了,单点 阅读全文
posted @ 2018-07-25 17:09 Dilthey 阅读(4269) 评论(1) 推荐(2) 编辑
摘要: 题目链接:https://www.nowcoder.com/acm/contest/140/A 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/ 阅读全文
posted @ 2018-07-23 10:41 Dilthey 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.nowcoder.com/acm/contest/139/D 题目描述 Two undirected simple graphs and where are isomorphic when there exists a bijection on V satisfyi 阅读全文
posted @ 2018-07-21 17:21 Dilthey 阅读(456) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.nowcoder.com/acm/contest/139/J 题目描述 Given a sequence of integers a1, a2, ..., an and q pairs of integers (l1, r1), (l2, r2), ..., (lq 阅读全文
posted @ 2018-07-20 14:34 Dilthey 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=2104 Description You are working for Macrohard company in data structures department. After failing your previous task 阅读全文
posted @ 2018-07-20 09:50 Dilthey 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1986 Description Farmer John's cows refused to run in his marathon since he chose a path much too long for their leisur 阅读全文
posted @ 2018-07-18 12:31 Dilthey 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Tarjan-LCA算法是一种离线算法。 算法描述: DFS遍历每个节点,对于遍历到的当前节点u: ①建立以u为代表元素的集合。 ②遍历与u相连的节点v,如果没有被访问过,对于v使用Tarjan-LCA算法,结束后,将v的集合并入u的集合。 ③对于与u有关的询问Query(u,v),如果v被访问过, 阅读全文
posted @ 2018-07-18 11:59 Dilthey 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6278 Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others) Problem Descrip 阅读全文
posted @ 2018-06-27 20:44 Dilthey 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1808 Time limit: 5000 ms Memory limit: 131072 kB Bobo 居住在大城市 ICPCCamp。 ICPCCamp 有 n 个地铁站,用 1,2 阅读全文
posted @ 2018-05-09 21:16 Dilthey 阅读(261) 评论(0) 推荐(0) 编辑
摘要: vector邻接表: 遍历某个链表的方法: for(int i=0;i<G[u].size();i++) 最喜欢这种写法,写起来快,也非常好理解。 vector邻接表还有一种魔性写法: 其实差不多……属于懒人中的懒人写法。 数组邻接表: 遍历某个链表的方法: for(int i=head[u];i; 阅读全文
posted @ 2018-05-09 20:07 Dilthey 阅读(2457) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2544 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Descripti 阅读全文
posted @ 2018-05-08 23:21 Dilthey 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4514 Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Problem Descripti 阅读全文
posted @ 2018-05-08 16:35 Dilthey 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/problemset/problem/838/B You are given a directed weighted graph with n nodes and 2n - 2 edges. The nodes are labeled from  阅读全文
posted @ 2018-05-07 21:38 Dilthey 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5692 Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Descript 阅读全文
posted @ 2018-05-04 10:34 Dilthey 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1809 Bobo has a balanced parenthesis sequence P=p 1 p 2…p n of length n and q questions. The i 阅读全文
posted @ 2018-05-03 20:52 Dilthey 阅读(556) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1804 Bobo 有一个 n 个点,m 条边的有向无环图(即对于任意点 v,不存在从点 v 开始、点 v 结束的路径)。 为了方便,点用 1,2,…,n 编号。 设 count(x,y) 阅读全文
posted @ 2018-05-02 23:29 Dilthey 阅读(580) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 22 下一页