TJ_ovo
TJ_ovo
全部文章
题解
归档
标签
去牛客网
登录
/
注册
TJ_ovo的博客
全部文章
/ 题解
(共4篇)
洛谷p9087
「SvR-2」音符 题目描述 本题中「子串」指: 若字符串 sss 中有一段连续的字符构成字符串 ppp,则 ppp 是 sss 的子串。 我们用一个字符串代替一份乐谱,用字符代替每一个音符。 我们定义「重音」表示乐谱中出现了两个连续的相同字符,如 eeeee\tt eeeeeeeeee 中存在...
C++
dp
单调队列
2023-03-12
1
430
洛谷P4933 大师
首先定义状态,dp[i][j]表示考虑到第i个数字时,公差为j的方案数. 对于每一个位置i,枚举它的上一个位置k,可得转移方程: dp[i][h[i]-h[k]]+=dp[k][h[i]-h[k]]+1; #define _CRT_SECURE_NO_WARNINGS #include<st...
C++
动态规划
2023-02-27
1
368
R. Occupation
Occupation Miceren wants to occupy some cities here. Each city has a value . (Notice that the value of a city may be negative. Nevertheless, Miceren w...
C++
2023-02-09
1
536
Aragorn's Story
题目描述 Problem Description Our protagonist is the handsome human prince Aragorn comes from The Lord of the Rings. One day Aragorn finds a lot of enemies...
C++
2023-02-08
1
409