链接: https://vjudge.net/problem/HDU 4507 题意: 单身! 依然单身! 吉哥依然单身! DS级码农吉哥依然单身! 所以,他生平最恨情人节,不管是214还是77,他都讨厌! 吉哥观察了214和77这两个数,发现: 2+1+4=7 7+7=7 2 77=7 11 最终 ...
分类:
其他好文 时间:
2019-12-07 01:26:19
阅读次数:
103
链接: https://vjudge.net/problem/HDU 4734 题意: For a decimal number x with n digits (A nA n 1A n 2 ... A 2A 1), we define its weight as F(x) = A n 2 n 1 ...
分类:
其他好文 时间:
2019-12-07 01:15:42
阅读次数:
120
链接: https://vjudge.net/problem/HDU 3709 题意: A balanced number is a non negative integer that can be balanced if a pivot is placed at some digit. More ...
分类:
其他好文 时间:
2019-12-07 01:14:03
阅读次数:
81
链接: https://vjudge.net/problem/HDU 3652 题意: A wqb number, or B number for short, is a non negative integer whose decimal form contains the sub string ...
分类:
其他好文 时间:
2019-12-07 01:12:49
阅读次数:
105
题目转自hdu 1102,题目传送门 题目大意: 输入一个n*n的邻接矩阵,其中i行j列代表从i到j的路径的长度 然后又m条路已经帮你修好了,求最短要修多长的路才能使所有村庄连接 不难看出,这道题就是标准的最小生成树模板,多水啊 虽然很水,但本人还是调了近1h才把代码调好...... 下面介绍一下解 ...
分类:
其他好文 时间:
2019-12-06 23:29:46
阅读次数:
152
链接: https://vjudge.net/problem/HDU 4352 题意: a 到 b中一个数组成递增子序列长度等于k的数的个数 思路: 因为只有10个数,使用二进制维护一个递增序列,每次更新在注释写了。 然后正常的数位DP, Dp(i, j, k),i是位置,j是当前的递增状态,k是长 ...
分类:
其他好文 时间:
2019-12-06 00:33:02
阅读次数:
120
链接: https://vjudge.net/problem/HDU 3555 题意: The counter terrorists found a time bomb in the dust. But this time the terrorists improve on the time bom ...
分类:
其他好文 时间:
2019-12-06 00:03:07
阅读次数:
94
题意:http://acm.hdu.edu.cn/showproblem.php?pid=1401 给你8*8的棋盘和4个棋子初始位置、最终位置,问你能否在8次操作后达到该状态。 思路: 双向BFS,起点开始正搜4步,终点倒搜4步,map标记。 1 #define IOS ios_base::syn ...
分类:
其他好文 时间:
2019-12-05 22:12:08
阅读次数:
113
这道题很水但我还是调了0.25h 感谢wsy大佬的帮助 emmm...... 首先,这肯定是一个n*k的dp 其中,i表示有i个物品,j表示需要搬j回 那么我们可以得出它的转移方程: dp[i][j]=min(dp[i-1][j],dp[i-2][j-1]+(int)pow((w[i]-w[i-1] ...
分类:
其他好文 时间:
2019-12-04 20:19:23
阅读次数:
80