上一页 1 ··· 8 9 10 11 12
摘要: #include<iostream> #include<string> #include <cstdlib> #include <algorithm> #include <cstdio> using namespace std; const int N = 1e5 + 5; struct node 阅读全文
posted @ 2020-01-21 16:45 hulian425 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://www.luogu.com.cn/problem/P1955 AC代码 #include<iostream> #include <algorithm> #include<cstdio> using namespace std; typedef long long ll; c 阅读全文
posted @ 2020-01-21 11:23 hulian425 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 题意:给你一个序列,他的序列和是否大于他的任何他的子序列(连续的子序列)的和。 题目链接:https://vjudge.net/problem/CodeForces-1285B 思路:求他的最大连续子序列和。那如何求最大子序列和呢?用动态规划求即可。但是要注意的是,子系列不能和原序列一样。 用dp[ 阅读全文
posted @ 2020-01-18 08:43 hulian425 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=4810 解题思路: 记录下每个数的各个位上1个数的和,根据题意,异或要产生数值,必须是取基数个1,通过组合数学的方法,比如要在6个1里面取三个1,则取得方法有C(6,3),那么如何可以快速取得C(6,3)呢 阅读全文
posted @ 2020-01-13 09:43 hulian425 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 题目连接 :http://acm.hdu.edu.cn/showproblem.php?pid=4803 思路 第一种操作数量加1,第二种操作单价加y/x,所以第一种操作的数量是肯定不变的,只能操作x-1次,所以只需要在每次进行操作一之前,先进行操作2,让其到达最大单价。那么如何得到最大单价呢,易得 阅读全文
posted @ 2020-01-12 19:39 hulian425 阅读(93) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12