#include #include #include #include using namespace std; int char_to_int(char c){ return int(c)-96; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); //好像就是最多不交区间,贪心 //不对,这个要求长度长,而不是串多,那应该是区间dp int n; string s; int dp[27][27]; for(int i=1;i<=26;i++){ for(int j=1;j<=26;j++){ dp[i][j]=0; } } cin>>n; for(int i=0;i>s; for(int j=1;j