文章
5
粉丝
318
获赞
3
访问
53.3k
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int common(string s1,string s2){
if(s1 == s2){
return 0;
}else if(s1[1] == s2[0] && s1[2] == s2[1]){
return 1;
}else if(s1[2] == s2[0]){
return 2;
}else{
return 3;
}
}
int main(){
string s[10][6] = {{"aaa","aaa","aaa","aaa","aaa","aaa",},
{"aab","aba","aab","aba","baa","baa",},
...
登录后发布评论
通过90%,最后一组超时,说明算法细节上还有优化的空间,加油