dp水题 题意读了好一会 是不能连续读两个及以上单词
1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 #include<stdlib.h> 6 #include<vector> 7 #include<queue> 8 #include<cmath> 9 using namespace std; 10 #define N 10010 11 int dp[N],len[N]; 12 char s[N][30],ss[N*100]; 13 int main() 14 { 15 int i,g=0; 16 while(scanf("%c",&ss[g])!=EOF) 17 { 18 g++; 19 } 20 int t = 0,o=1; 21 for(i = 0 ; i < g ; i++) 22 { 23 if((ss[i]>='a'&&ss[i]<='z')||(ss[i]>='A'&&ss[i]<='Z')) 24 { 25 s[o][t++] = ss[i]; 26 } 27 else 28 { 29 if(t) 30 { 31 s[o][t] = '