| 比赛 | CSP2023-J模拟赛 | 评测结果 | RRRRRRRRRRRRRRRRRRRR | 
|---|---|---|---|
| 题目名称 | 切分子串 | 最终得分 | 0 | 
| 用户昵称 | leaf | 运行时间 | 0.009 s | 
| 代码语言 | C++ | 内存使用 | 5.74 MiB | 
| 提交时间 | 2023-10-18 18:18:09 | ||
#include<bits/stdc++.h>
using namespace std;
int main(){
	string s,t,t1,t2;
	int sum,l,ind1,ind2;
	cin>>s>>t;
	l = t.length();
	for(int i = 1;i < l;i++){
		t1 = t.substr(0,i);
		t2 = t.substr(i,l-i);
		ind1 = s.find(t1,0);
		ind2 = s.find(t2,0);
		if(ind1 <= s.length()&&ind2 <= s.length()){
			sum++;
		}
	}
	cout<<sum;
	return 0;
}