t1匹配
#include <bits/stdc++.h> using namespace std; int ans, sum, n; string s1, s2; int main(){ freopen("rotate.in", "r", stdin); freopen("rotate.out", "w", stdout); cin >> n; cin >> s1 >> s2; for (int i = 0; i < n; i++){ sum = 0; for (int j = 0; j < n; j++) if (s1[(i+j)%n] == s2[j]) sum++; ans = max(ans, sum); } cout << ans << endl; return 0; }