码迷,mamicode.com
首页 >  
搜索关键字:hdu 5206 four inages    ( 31693个结果
#SG函数#HDU 1848 Fibonacci again and again
题目 分析 可取状态只能是斐波那契数,求出SG函数 然后判断三个数sg函数异或和不为0先手必胜 代码 #include <cstdio> #include <cctype> #define rr register using namespace std; const int p[15]={1,2,3 ...
分类:其他好文   时间:2021-04-07 10:55:22    阅读次数:0
P1220 关路灯
原题链接 考察:区间dp 这题好像HDU 4283 可以往左或者往右走.但是这道题起始位置不确定,也就是说,i位置不一定是栈底. 非常详细的题解 思路: 因为题目完全不一样,所以必须换一个思路.以f[i][j]表示灭掉[i,j]所有灯消耗的功率.首先明确老张灭灯只要路过了就会灭,因此最后的位置要么是 ...
分类:其他好文   时间:2021-04-07 10:35:12    阅读次数:0
HDU - 6005 Pandaland (无向图最小环,动态加边Dijkstra)
题目链接 题意:求无向图最小环(n<=8000,m<=4000) 动态把边加进去跑Dij,在加入一条边(u,v,c)之前,先求出mindis(u,v),更新答案ans=min(ans,mindis(u,v)+c),复杂度$O(m^2logn)$ 1 #include<bits/stdc++.h> 2 ...
分类:其他好文   时间:2021-04-06 14:28:01    阅读次数:0
HDU - 2196 Computer(二次扫描+换根法树形dp)
题目链接 #题目大意 求树上每个点到其他点的最大距离。 #解题思路 首先随便选择一个顶点作为根然后跑一遍dfs,记录每个顶点以其为根能到达的最大深度和次大深度,然后再跑一遍dfs,对于每个顶点,如果要到达一个距离最大的点,要么就是原来中的子树中的距离最大的点,要么就是经过父节点的某个点。 #代码 c ...
分类:其他好文   时间:2021-04-02 13:22:41    阅读次数:0
Aragorn's Story - 树链剖分 - HDU 3966
Aragorn's Story - 树链剖分 - HDU 3966 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 5e4+5; int n, m, p; char op[5]; in ...
分类:其他好文   时间:2021-03-06 14:20:12    阅读次数:0
hdu-2020
Problem Description 输入n(n<=100)个整数,按照绝对值从大到小排序后输出。题目保证对于每一个测试实例,所有的数的绝对值都不相等。 Input 输入数据有多组,每组占一行,每行的第一个数字为n,接着是n个整数,n=0表示输入数据的结束,不做处理。 Output 对于每个测试实 ...
分类:其他好文   时间:2021-03-03 12:34:41    阅读次数:0
hdu 1561The more, The Better(树上背包+对树分别背包)
The more, The Better Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12033 Accepted Submission(s) ...
分类:其他好文   时间:2021-02-26 12:53:14    阅读次数:0
HDU 2089 不要62
状态表示: dp[len][sta]表示当前第len位,上一位为last的情况下满足条件的数的个数。 int f[15][10]; int a[15]; int l,r; int dfs(int len,int last,bool limit) { if(!len) return 1; if(!li ...
分类:其他好文   时间:2021-02-22 12:12:38    阅读次数:0
2020 BIT冬训-二分三分快速幂矩阵 L - Decode the Strings HDU - 2371
Problem Description Bruce Force has had an interesting idea how to encode strings. The following is the description of how the encoding is done:Let x1 ...
分类:其他好文   时间:2021-02-19 13:18:41    阅读次数:0
HDU-6356 Glad You Came 线段树+剪枝
\(\text{原题链接}\) \(\text{题目大意}\) 初始有一个长度为 \(n\) 的序列 \(a\),初始全 \(0\)。 共 \(m\) 次修改,每次修改 \((l,r,v)\),让 \(a_i = \max(a_i, v), (l\leq i\leq r)\)。求出所有操作后的 \( ...
分类:其他好文   时间:2021-02-15 12:15:44    阅读次数:0
31693条   上一页 1 2 3 4 ... 3170 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!