"题目链接" ac代码(注意字符读入前需要注意回车的影响) ...
分类:
编程语言 时间:
2020-02-16 01:39:45
阅读次数:
74
N皇后问题 这是第一次写DFS的问题,原来是会一点,但是现在忘得有点干净,重新看了看这八皇后的问题,当然,重新理解的时候依然遇到一些问题,参考了他人的博客@https://www.cnblogs.com/chenchengxun/p/3759278.html。 题目: 思路:这道题就是一个常见的DF ...
分类:
其他好文 时间:
2020-02-15 20:29:18
阅读次数:
68
此博客链接: 1.亲和数(23min) 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2040 Problem Description 古希腊数学家毕达哥拉斯在自然数研究中发现,220的所有真约数(即不是自身的约数)之和为: 1+2+4+5+10+11 ...
分类:
其他好文 时间:
2020-02-15 18:29:08
阅读次数:
118
sort 思路:正常使用sort即可,注意是从大到小排序,需要一个cmp函数保证排序,如果使用cin和cout会超时,所以,改用时间短的scanf和printf。 代码: #include<iostream> #include<algorithm> using namespace std; int ...
分类:
其他好文 时间:
2020-02-15 15:25:38
阅读次数:
44
题意:http://acm.hdu.edu.cn/showproblem.php?pid=5261 思路: 可以发现每个i都有一个取值半径,单调队列顺逆维护两遍就行了。 1 #define IOS ios_base::sync_with_stdio(0); cin.tie(0); 2 #includ ...
分类:
其他好文 时间:
2020-02-15 13:25:44
阅读次数:
77
HDU 4122 单调队列 题意 给定 个订单,在相应时刻都要生产 个月饼,给出 个可以生产的时刻和这个时刻生产单个产品的费用 ,每个月饼可以存储 个小时的保质期,但是存储月饼也是要花钱的,每小时存储需要花费 ,求出最小花费。 解题思路 一定要读清楚题意。 其实对于每个订单都有一个确定的生产时刻(最 ...
分类:
其他好文 时间:
2020-02-14 18:34:08
阅读次数:
69
C - Piggy-Bank HDU - 1114 Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this ...
分类:
其他好文 时间:
2020-02-14 16:24:58
阅读次数:
72
Problem: how to cluster non-stationary multivariate time series. What are stationary time series How to consider both global features and local featur ...
分类:
其他好文 时间:
2020-02-14 01:15:50
阅读次数:
100
单向并查集,问至少给几个点可以遍历全图,连通块数量n,入度为0的点的数量m,取max(n,m)~ #include<cstdio> #include<algorithm> #include<cstring> using namespace std; const int maxn=1e6+14; in ...
分类:
其他好文 时间:
2020-02-13 23:19:04
阅读次数:
104
The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each ...
分类:
其他好文 时间:
2020-02-13 22:47:12
阅读次数:
94