设为首页 加入收藏

TOP

codeforces Div.2 B.Suffix Structures
2015-07-20 18:06:30 来源: 作者: 【 】 浏览:11
Tags:codeforces Div.2 B.Suffix Structures

题意是给我们两个字符串,再在第一个字符串中找第二个,

给了我们两种方法,一:在第一个字符串删掉一些字符后得到第二个字符串;

二:在第一个字符串中改变一些字符的先后顺序得到字符串二;

如果只用第一种方法输出: automaton;

只用第二种输出:array

两种都用输出:both;

找不到输出:need tree;

直接找就行,,,,,,水

#include
  
   
#include
   
     using namespace std; int main() { char a[101],b[101]; int s[101]; int c,d,i,j; scanf("%s",a); scanf("%s",b); c=strlen(a); d=strlen(b); for(i=0,j=0;i
    
     d) printf("both\n"); } else printf("need tree\n"); return 0; }
    
   
  


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Codeforces Round #256 (Div. 2) 下一篇C++ Primer Plus的若干收获--(三..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: