摘要: #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #include <string.h> #define R(x) x = read() #define For 阅读全文
posted @ 2024-04-03 22:11 Gold_stein 阅读(10) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #include <string.h> #define R(x) x = read() #define For 阅读全文
posted @ 2024-04-03 22:03 Gold_stein 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 思路 状压+优化 代码 #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #include <string.h> #define R(x) x = read() 阅读全文
posted @ 2024-04-03 11:49 Gold_stein 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 啊米诺斯1 啊米诺斯 啊米诺斯2 啊米诺斯 阅读全文
posted @ 2024-04-03 10:40 Gold_stein 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 1.首先想到的做法 设up_len[i]为以a[i]为结尾的最长不下降子序列的长度,down_len[i]表示以a[i]为开始的最长不下降子序列的长度。 在求pre的过程中记录下额外信息:down_pre[i]表示在求down_len[i]的过程中,i是由哪个点转移过来的; 得到dp的转移方程: i 阅读全文
posted @ 2024-04-03 10:35 Gold_stein 阅读(74) 评论(0) 推荐(0) 编辑