摘要:
代码: #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<vector> #include<algorithm> #include<math.h> #include<sstream> #include<string> #inclu 阅读全文
posted @ 2024-05-26 17:29
WHUStar
阅读(47)
评论(0)
推荐(0)
摘要:
有点水,但是细究还是有点意思的题目 https://www.luogu.com.cn/problem/P1474 一开始的代码: #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<vector> #include<algorith 阅读全文
posted @ 2024-05-26 15:11
WHUStar
阅读(38)
评论(0)
推荐(0)
摘要:
链接:https://www.luogu.com.cn/problem/CF212E https://codeforces.com/problemset/problem/212/E 题目: 思路: 首先题目说要保证最大的数量,并且每个颜色的点至少有一个,那么很显然染色的点有n-1个,且唯一没染色的点 阅读全文
posted @ 2024-05-26 14:26
WHUStar
阅读(43)
评论(0)
推荐(0)
摘要:
链接:https://www.luogu.com.cn/problem/P1944 题目: 思路:注意题目里说的: 1.(),[]是括号匹配的字符串。 2.若A是括号匹配的串,则(A),[A]是括号匹配的字符串。 3.若A,B是括号匹配的字符串,则AB也是括号匹配的字符串。 所以设dp[i]是以i结 阅读全文
posted @ 2024-05-26 11:28
WHUStar
阅读(28)
评论(0)
推荐(0)
摘要:
链接:https://www.luogu.com.cn/problem/P1929 题目: 思路:动态规划:以times[i]表示跳到第i号台阶的最小步数。 如果height[i] == height[i-1] + 1那么显然有times[i] = times[i-1] + 1 然后是遍历的状态转移 阅读全文
posted @ 2024-05-26 09:58
WHUStar
阅读(47)
评论(0)
推荐(0)

浙公网安备 33010602011771号