码迷,mamicode.com
首页 >  
搜索关键字:15-puzzle problem    ( 37568个结果
线段树 P3373
题目 https://www.luogu.com.cn/problem/P3373 思路 参考:https://www.luogu.com.cn/blog/milkfilling/solution-p3373 ①加法优先,即规定好segtree[root*2].value=((segtree[roo ...
分类:其他好文   时间:2020-05-03 16:28:26    阅读次数:44
LeetCode - Binary Tree Maximum Path Sum
Given a non-empty binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any ...
分类:其他好文   时间:2020-05-03 14:27:36    阅读次数:67
【题解】多边形染色
"Link" 蒟蒻做的为数不多的环形$dp$,技巧不到位,写题解来总结一下。 $\text{Solution:}$ $dp$柿子还是很好推出来的:$dp[i][j]$表示地$i$个点染色是$j$的方案数。先考虑没有限制的转移: $$dp[i][j]=\sum_{k\not=j} dp[i 1][k] ...
分类:其他好文   时间:2020-05-03 12:27:00    阅读次数:51
92. 递归实现指数型枚举(Acwing)-递归
92. 递归实现指数型枚举(Acwing) 题目链接: https://www.acwing.com/problem/content/94/ 题解: 一个位置选或者不选两种情况,递归到边界(n个已经选完了),输出结果即可 AC代码: ...
分类:Windows程序   时间:2020-05-03 01:00:46    阅读次数:74
5.2 每日一题题解
Phoenix and Distribution + 题目链接: "http://codeforces.com/contest/1348/problem/C" 涉及知识点: + 贪心 solution: + $今天的题是昨晚cf Div2的C题,坑点也很多$ + $把这个字符串分成k个子字符串,那么 ...
分类:其他好文   时间:2020-05-02 19:27:24    阅读次数:53
Music Problem
题目链接:https://ac.nowcoder.com/acm/contest/5203 题意简化一下就是让我们在数组中找出一组子序列的和为3600的倍数 想法: 我们不妨考虑下 dp 的做法 (但是好像不是官方的正解) 我们设 dp[i] 代表 % 3600 之后结果为 i 的序列的个数 我们考 ...
分类:其他好文   时间:2020-05-02 16:46:20    阅读次数:59
CodeForces 1348-C Phoenix and Distribution(字典序)
https://codeforces.com/contest/1348/problem/C 题意: 给你一个长度为n的字符串,要求你将它的字符分为k份,每份个数至少有1个,使得新组合的字符串中字典序最大的字符串的字典序尽可能小,打印这个字符串。 解题思路: 先sort下,然后给每份分一个字符,如果第 ...
分类:其他好文   时间:2020-05-02 16:34:27    阅读次数:53
1145 Hashing - Average Search Time (25分)
The task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. Then try to find another sequence of inte ...
分类:其他好文   时间:2020-05-02 15:11:59    阅读次数:52
1146 Topological Order (25分)
This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed grap ...
分类:其他好文   时间:2020-05-02 15:07:22    阅读次数:55
[题解] CF85D Sum of Medians
~~为什么你们代码那么清奇俊秀啊~~ ~~为什么暴力都过了啊~~ ~~为什么我这么菜啊...~~ 请忽略上面的话 == CF: "https://codeforces.com/problemset/problem/85/D" Luogu: "https://www.luogu.com.cn/prob ...
分类:其他好文   时间:2020-05-02 15:03:04    阅读次数:49
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!