摘要:
数据库日志信息表 配置文件 在web.xml下配置监听器,用于获取Request,便于得到访问ip <listener> <listener-class>org.springframework.web.context.request.RequestContextListener</listener- 阅读全文
摘要:
概括 在服务器端我们可以通过Spring security提供的注解对方法来进行权限控制。Spring Security在方法的权限控制上 支持三种类型的注解,JSR-250注解、@Secured注解和支持表达式的注解,这三种注解默认都是没有启用的,需要 单独通过global-method-secu 阅读全文
摘要:
AcWing282.石子合并 题解 #include <iostream> using namespace std; const int N = 310; int n, f[N][N], nums[N], s[N]; int main() { cin >> n; for(int i = 1; i < 阅读全文
摘要:
AcWing896.最长上升子序列 II 题解 二分解法 q[i]保存长度为i的最小末尾,这样即可严格单调递增,从而对于每个新的数只要找出小于它的最大值就可算出长度 #include <cstdio> #include <iostream> using namespace std; const in 阅读全文
摘要:
AcWing895.最长上升子序列 题解 #include <iostream> using namespace std; const int N = 1010; int f[N], nums[N]; int main() { int n, ans = 0; cin >> n; for(int i 阅读全文
摘要:
AcWing898.数字三角形 题解 自底向上 #include <iostream> using namespace std; const int N = 510; int f[N][N]; int main() { int n; cin >> n; for(int i = 1; i <= n; 阅读全文
摘要:
AcWing9.分组背包问题 题解 一维状压 #include <iostream> using namespace std; const int N = 110; int n, m, s[N], v[N][N], w[N][N], f[N]; int main() { cin >> n >> m; 阅读全文
摘要:
AcWing5.多重背包问题 II 题解 #include <iostream> using namespace std; const int N = 20010, M = 2010; int v[N], w[N], cnt, n, m, f[M]; int main() { int a, b, c 阅读全文
摘要:
AcWing4.多重背包问题 I 题解 状态分析与朴素完全背包问题相同。 不可如完全背包问题那样优化成二维循环:因为物品有个数限制 j - v的k和v的k不一定是一致的,例如:j-v → j-(s[i]+1) * v, j → j - s[i]*v #include <iostream> using 阅读全文
摘要:
AcWing3.完全背包问题 题解 朴素写法 #include <iostream> using namespace std; const int N = 1010; int v[N], w[N]; int f[N][N]; int main() { int n, m; cin >> n >> m; 阅读全文