#include #include #include using namespace std;const int maxn = 105;int equ, var; // 有equ个方程,var个变。增广阵行数为equ, 分别为0到equ - 1,列数为var + 1,分别为0到var.int a[maxn][maxn];int x[maxn]; // 解集.bool free_x
原创 2021-08-13 14:04:21
114阅读
    大四了,终于有时间把一些该学习的知识学习一下了。前一段时间学习了android,发现布局真的好烦。最近学习了jQuery Mobile,发现它真的省去了好多事。     今天,就让我总结一下我的jQuery Mobile入门遇到的一些问题。     首先,在运行代码之前,我们需要配
转载 2024-10-30 11:53:35
19阅读
Find the nondecreasing subsequences Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1844 Accepte
原创 2021-07-21 15:40:51
100阅读
题目大意:给定一个序列,求出其所有的上升子序列。题解:一开始我以为是动态规划,后来发现离散后树状数组很好做,首先,c保存的是第i位上升子系列有几个,那么树状数组的sum就直接是现在的答案了,不过更新时不要忘记加1,因为当前元素本身也是一个子序列,比如数列离散后为1 3 2 4 5,那么第一位得到之前的答案为0,更新时1位加1,第二位算出为1,更新时3位加(1+1),第三位也一样,一次类推,同树状数组求逆序对的方法一样,但是更新的不是1,而是之前所有的答案数加1。#include #include using namespace std; const int N=100005;...
转载 2014-03-03 10:51:00
47阅读
2评论
Find the nondecreasing subsequencesTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Pr
原创 2023-05-29 23:59:34
69阅读
题意: 思路: 搞一个priority_queue 先把边界加进去 不断取最小的 向中间扩散//By SiriusRen#include #include #include using namespace std;#define int long longstruct...
转载 2016-10-29 09:01:00
129阅读
2评论
Problem DescriptionHow many nondecreasing subsequences can you find in the sequence S = {s1, s2, s3, ...., sn} ? For example, we assume that S = {1, 2...
转载 2015-09-01 16:58:00
82阅读
2评论
Find the nondecreasing subsequencesTime Limit: 10000/5000 MS (Java/Others)    Memory Lim
原创 2022-08-30 11:28:57
70阅读
Find the nondecreasing subsequences Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2213 Accepte
转载 2018-07-26 15:14:00
36阅读
2评论
Find the nondecreasing subsequences Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1235Accepted Submission(s): 431 Problem Description How many nondecreasing subsequences can you find in the sequence S = {s1, s2, s3, ...., sn} ? For ...
转载 2013-09-01 19:47:00
42阅读
2评论
传送门题目大意一个矩形区域,高低起伏,求最多储水量。(边界不能储水)思路先将边界加入优先队列,每次取高度最小的点,找与其相邻
原创 2022-07-15 10:43:49
92阅读
说到PPT这个事儿,虽然我有的时候吐槽别人PPT模式,但是现实世界就是你和人对接事儿的时候就是需要PPT,人家一看已经上会过一次,但是还有很多欠缺,这个项目总...
原创 2024-04-25 12:29:03
45阅读
题目:http://acm.hdu.edu.cn/想到逆序数,自然也会想
原创 2023-05-31 23:07:05
76阅读
http://acm.hdu.edu.cn/showproblem.php?pid=2227 用dp[i]表示以第i个数为结尾的nondecreasing串有多少个。 那么对于每个a[i] 要去找 <= a[i]的数字那些位置,加上他们的dp值即可。 可以用树状数组维护 #include <cstd
原创 2022-10-20 11:03:37
55阅读
题意:问不下降子序列有多少个 思路:用树状数组维护嘛。。假如树状数组节点i表示的是以A[i]结尾的不下降子序列有多少个,记为F[i] 那么我们,求A[i]的时候,相当于在[1,i-1]中找到 这种动态规划的思想,只是用树状数组去优化了而已 然后因为A[i]范围非常大,,所以需要先排序一遍,然后二分用对应的下标去操作 #include #include #include #include
原创 2022-11-24 00:01:57
48阅读
Find the nondecreasing subsequencesTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1072Accepted Submission(s): 370Problem DescriptionHow many nondecreasing subsequences can you find in the sequence S = {s1, s2, s3, ...., sn} ? For example, we assu
转载 2013-07-03 12:08:00
110阅读
2评论
Problem Descrip
原创 2023-04-24 02:37:59
37阅读
//类模版与友函数 #include using namespace std; template class Complex{ public: Complex(T a,T b); void Print() const//const修饰的是this指针 { cout Real Image Complex::Complex(T a, T b){ t...
转载 2016-07-11 22:13:00
140阅读
2评论
欧几里得算法 gcd,\(O(\log n)\) ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;} lcm,\(O(\log n)\) // 注意数据范围,过大的数要用__int128 ll lcm(ll a, ll b) {return a * ...
转载 2021-09-03 13:58:00
317阅读
2评论
Problem Description How many nondecreasing subsequences can you find in the sequeue
原创 2015-06-02 18:52:33
196阅读
  • 1
  • 2
  • 3
  • 4
  • 5