Login
Register
Problem list
Online status
harkerhand
:
2025-04-25 16:53:09
虽然但是,标准库秒了 #include
using namespace std; #define int long long signed main() { int T; cin >> T; while (T--) { int n, m; string s, t; cin >> n >> m >> s >> t; int count = 0; int pos = 0; while ((pos = s.find(t, pos)) != string::npos) count++, pos++; cout << count << endl; } return 0; }
许士杰
:
2020-12-15 13:13:31
结果不能分别输出。。。。必须最后一起输出
Post Your Comment