原题链接 考察:状压dp 思路: 考虑到计算三角形,我们需要知道落脚点i和前一个落脚点j,所以需要三维数组.根据状态转移方程f[i][j][k] = f[i-{j}][k][t]+score很容易求出最大的权值.但是比较难想到怎么计算路径数目(对本蒟蒻而言).方法是再声明一个记录当前路径最大值的方案 ...
分类:
其他好文 时间:
2021-02-17 14:41:52
阅读次数:
0
#include<bits/stdc++.h> #define N 300010 using namespace std; #define int long long int h[N],nxt[N],v[N],w[N],s,t,dep[N],ec,p[N],n,a[N],b[N],c[N],f[N] ...
分类:
其他好文 时间:
2021-02-17 14:04:51
阅读次数:
0
A - Favorite Sound #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int main(){ int a, b, c; cin >> a >> b >> ...
分类:
其他好文 时间:
2021-02-16 12:44:42
阅读次数:
0
不开long long见祖宗。 struct Node { LL galleon,sickle,knut; }a,b; int main() { scanf("%d.%d.%d",&a.galleon,&a.sickle,&a.knut); scanf("%d.%d.%d",&b.galleon,& ...
分类:
其他好文 时间:
2021-02-16 12:33:27
阅读次数:
0
SpringSecurity的身份认证流程、SpringSecurity做JWT身份认证流程和请求的认证流程 ...
分类:
编程语言 时间:
2021-02-16 11:54:35
阅读次数:
0
14. 最长公共前缀 编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 ""。 示例 1: 输入:strs = ["flower","flow","flight"] 输出:"fl" 示例 2: 输入:strs = ["dog","racecar","car"] 输出: ...
分类:
其他好文 时间:
2021-02-16 11:50:27
阅读次数:
0
https://www.acwing.com/problem/content/1136/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:
其他好文 时间:
2021-02-15 11:53:26
阅读次数:
0
Problem Description Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer poin ...
分类:
其他好文 时间:
2021-02-10 13:02:09
阅读次数:
0
类型转换 低——————————————————高 byte->short->char->int->long->float->double 由于Java是强类型语言,所以进行有些运算的时候,需要用到类型转换 运算中,不同类型的数据先转化为同一类型,然后进行运算 强制类型转换 (类型)变量名 高——低 ...
分类:
编程语言 时间:
2021-02-10 12:58:59
阅读次数:
0
GEO底层是基于zset来实现的 常用命令:https://blog.csdn.net/liutao43/article/details/110576772 geoadd key 经度 纬度 member : 可以批量添加 geodist key member1 member2 [m/km/fm] ...
分类:
其他好文 时间:
2021-02-10 12:58:44
阅读次数:
0