#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <math.h>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
int ans;
string s, t;
int sk, tk;
int main() {
cin >> s >> t;
int slen = s.length();
int tlen = t.length();
while (sk < slen&&tk < tlen) {
if (s[sk] == t[tk]) {
ans++;
sk++;
tk++;
}
else {
tk++;
}
}
cout << ans+1 << endl;
return 0;
}
博客围绕Codeforces 265A多彩石头简化版展开,但具体内容缺失。推测可能涉及该题目的解题思路、代码实现等信息技术相关内容。
2577

被折叠的 条评论
为什么被折叠?



