码迷,mamicode.com
首页 >  
搜索关键字:15-puzzle problem    ( 37568个结果
马拉车算法
Manacher 模板 例题 最长双回文串 https://www.luogu.com.cn/problem/P4555 题意 在给定的字符串中找到两个相邻的回文串,长度最长 思路 将Manacher处理后的" "当作两个回文串的连接点 注意这个处理步骤: 还有这个步骤: 代码 : https:// ...
分类:编程语言   时间:2020-03-28 00:56:00    阅读次数:75
https://vjudge.net/contest/363991#problem/C
这个点的水可以从其他点来,也可以从0号结点来,所以把0号结点当成超级源点,然后跑最小生成树 #include <iostream> #include <cstdio> #include <queue> #include <algorithm> #include <cmath> #include <c ...
分类:Web程序   时间:2020-03-27 23:28:05    阅读次数:198
CF1328E-Tree Queries(补) (dfs序)
题目链接: https://codeforces.com/contest/1328/problem/E 思路: 题目大意就是问你从顶点到另一个点u,是否存在一条链,满足询问中的每个点都在 链上或者点的父节点在链上,首先我们可以发现深度最深的那个点max肯定是在链中的, 那么接下来我们只需要将每个点和 ...
分类:其他好文   时间:2020-03-27 22:01:32    阅读次数:107
2059 龟兔赛跑
Problem Description 据说在很久很久以前,可怜的兔子经历了人生中最大的打击——赛跑输给乌龟后,心中郁闷,发誓要报仇雪恨,于是躲进了杭州下沙某农业园卧薪尝胆潜心修炼,终于练成了绝技,能够毫不休息得以恒定的速度(VR m/s)一直跑。兔子一直想找机会好好得教训一下乌龟,以雪前耻。最近正 ...
分类:其他好文   时间:2020-03-27 21:45:35    阅读次数:135
LeetCode | 0070. Climbing Stairs爬楼梯【Python】
LeetCode 0070. Climbing Stairs爬楼梯【Easy】【Python】【动态规划】 Problem "LeetCode" You are climbing a stair case. It takes n steps to reach to the top. Each tim ...
分类:编程语言   时间:2020-03-27 21:32:23    阅读次数:84
35. Search Insert Position
Problem : Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inse ...
分类:其他好文   时间:2020-03-27 21:17:05    阅读次数:48
HDoj 2027 统计元音
Problem Description 统计每个元音字母在字符串中出现的次数。 Input 输入数据首先包括一个整数n,表示测试实例的个数,然后是n行长度不超过100的字符串。 Output 对于每个测试实例输出5行,格式如下:a:num1e:num2i:num3o:num4u:num5多个测试实例 ...
分类:其他好文   时间:2020-03-27 20:02:00    阅读次数:60
7. Reverse Integer
Problem : Given a 32 bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: Note: Assume we are dealing with an environmen ...
分类:其他好文   时间:2020-03-27 19:48:05    阅读次数:67
4. Median of Two Sorted Arrays
Problem : There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time com ...
分类:其他好文   时间:2020-03-27 18:31:14    阅读次数:78
【CF】873B 前缀和+map
Balanced Substring 刚讲过差分与前缀和专题,一直以为这两个名词很高大上,其实也就那回事。哈哈。 题源 :https://codeforces.com/contest/873/problem/B 题意 :给你一串01字符串,让你寻找其中最长的平衡字符串长度。 平衡字符串 :字符串中 ...
分类:其他好文   时间:2020-03-27 13:09:26    阅读次数:82
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!