上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页
摘要: 题目链接:https://leetcode-cn.com/problems/container-with-most-water/description/ 给定 n 个非负整数 $a_1,a_2,\cdots,a_{n-1},a_n$,每个数代表坐标中的一个点 $(i, a_i)$。在坐标内画 n 条 阅读全文
posted @ 2018-10-14 23:14 Dilthey 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 题目链接:传送门 题目链接:https://www.luogu.org/problemnew/show/P4168 题解: 经典的在线求区间众数的问题,由于区间众数不满足区间可加性,所以考虑分块,假设分块长度为 $S$,则总共分成 $T=N/S$ 块, 对于每个询问 $[l,r]$,设点 $l$ 在 阅读全文
posted @ 2018-10-14 17:41 Dilthey 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6229 转载: https://blog.csdn.net/Anna__1997/article/details/78494788 题目大意 N * N的区域内,有K个格子不能到达,机器人从(0, 0)出 阅读全文
posted @ 2018-10-13 22:47 Dilthey 阅读(637) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6228 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Problem Descrip 阅读全文
posted @ 2018-10-13 22:37 Dilthey 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://nanti.jisuanke.com/t/31436 作为一名车手,为了提高自身的姿势水平,平时的练习是必不可少的。小 J 每天的训练包含 $N$ 个训练项目,他会按照某个顺序依次练习这些项目。出于一些玄妙的原因,训练的效果跟项目的顺序有着很大关系。当项目 $i$ 被安排在 阅读全文
posted @ 2018-10-12 12:32 Dilthey 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5992 题目链接:https://www.nowcoder.com/acm/contest/207/K Problem DescriptionThere are N hotels all over the 阅读全文
posted @ 2018-10-12 11:57 Dilthey 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 本文参考: https://www.cnblogs.com/GerynOhenz/p/8727415.html kuangbin的ACM模板(新) 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4347 Problem Description The 阅读全文
posted @ 2018-10-11 13:11 Dilthey 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 题目链接:传送门 描述 后缀数组 (SA) 是一种重要的数据结构,通常使用倍增或者DC3算法实现,这超出了我们的讨论范围。 在本题中,我们希望使用快排、Hash与二分实现一个简单的 $O(n \log^2 ⁡n )$ 的后缀数组求法。 详细地说,给定一个长度为 n 的字符串S(下标 0~n-1),我 阅读全文
posted @ 2018-10-08 23:58 Dilthey 阅读(457) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://nanti.jisuanke.com/t/31434 小 D 是一位著名的车手,他热衷于在广场上飙车。每年儿童节过后,小 D 都会在广场上举行一场别样的车技大赛。 小 D 所在的广场可以看作一个 W×H 的网格,初始时小 D 位于左下角的 (1,1) 处,他的目的地是位于右 阅读全文
posted @ 2018-10-08 22:53 Dilthey 阅读(488) 评论(0) 推荐(1) 编辑
摘要: 题目链接:https://leetcode-cn.com/problems/median-of-two-sorted-arrays/description/ 给定两个大小为 m 和 n 的有序数组 nums1 和 nums2 。 请找出这两个有序数组的中位数。要求算法的时间复杂度为 O(log (m 阅读全文
posted @ 2018-10-08 20:05 Dilthey 阅读(640) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.nowcoder.com/acm/contest/207/D 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5985 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K 阅读全文
posted @ 2018-10-08 15:58 Dilthey 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.nowcoder.com/acm/contest/207/G 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5988 时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K 阅读全文
posted @ 2018-10-07 20:59 Dilthey 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.nowcoder.com/acm/contest/206/A 题目描述 恬恬的生日临近了。宇扬给她准备了一个蛋糕。正如往常一样,宇扬在蛋糕上插了n支蜡烛,并把蛋糕分为m个区域。因为某种原因,他必须把第i根蜡烛插在第ai个区域或第bi个区域。区域之间是不相交的。宇扬在 阅读全文
posted @ 2018-10-07 08:09 Dilthey 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1166 题解: 本题作为一个模板题,我用它来检验过总查询时间复杂度为 $O(q \log n)$ 的树状数组模板、线段树模板以及zkw线段树模板;而今天,我们要来用分块来写这道题目。 时间复杂度: 初始化 阅读全文
posted @ 2018-10-06 01:31 Dilthey 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 目录: B - Fraction D - Triangle F - Harmonic Value Description H - Sequence I I - Sequence II B题:HDU 5912 - Fraction - [递归] 题目链接:http://acm.hdu.edu.cn/s 阅读全文
posted @ 2018-09-24 20:47 Dilthey 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3974 Time Limit: 15000MS Memory Limit: 65536K Description Andy the smart computer science student was attending an algo 阅读全文
posted @ 2018-09-23 23:52 Dilthey 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 题目链接:传送门 描述 很久很久以前,森林里住着一群兔子。有一天,兔子们想要研究自己的 DNA 序列。我们首先选取一个好长好长的 DNA 序列(小兔子是外星生物,DNA 序列可能包含 26 个小写英文字母),然后我们每次选择两个区间,询问如果用两个区间里的 DNA 序列分别生产出来两只兔子,这两个兔 阅读全文
posted @ 2018-09-23 22:26 Dilthey 阅读(513) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1426 Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation con 阅读全文
posted @ 2018-09-23 20:47 Dilthey 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://hihocoder.com/problemset/problem/1829 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 Lara Croft, the fiercely i 阅读全文
posted @ 2018-09-22 23:07 Dilthey 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目链接:校内OJ的题目,就不放链接了。 PS.可以说是本次9月月赛唯一的一道有一定难度的题目了。 题解: 考虑状压DP,假设 $sta$ 是一个二进制数,代表当前 $n$ 个人有几个是在队伍里的,剩下几个是没在队伍里的。 假设 $dp[sta][h]$:代表了当前 $sta$ 状态下,队伍最尾部那 阅读全文
posted @ 2018-09-22 22:51 Dilthey 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3279 Sample Input Sample Output 题意: 给出 $M$ 行 $N$ 的矩阵,每个元素只为 $0$ 或者 $1$,分别代表白块和黑块, 每次可以翻转一个元素,使得它可以从黑变白或者从白变黑,但是上下左右相邻的四 阅读全文
posted @ 2018-09-22 20:20 Dilthey 阅读(569) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3349 Time Limit: 4000MS Memory Limit: 65536K Description You may have heard that no two snowflakes are alike. Your task 阅读全文
posted @ 2018-09-20 22:00 Dilthey 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3278 Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He 阅读全文
posted @ 2018-09-19 23:07 Dilthey 阅读(431) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3983 题意: 给出一个长度为 $9$ 的字符串 $s$,且 $s$ 仅仅由三种字符组成:$3$ 个 "g"、$3$ 个 "a"、$3$ 个 "o"; 现在,每次可以 阅读全文
posted @ 2018-09-19 21:47 Dilthey 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://nanti.jisuanke.com/t/31453 After Incident, a feast is usually held in Hakurei Shrine. This time Reimu asked Kokoro to deliver a Nogaku sh 阅读全文
posted @ 2018-09-17 22:55 Dilthey 阅读(160) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页