题意:
各种trick很烦人,,,
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ios_base::sync_with_stdio(0);
int n;
string a , b;
cin >> n >> a >> b;
int ans = 0;
for (int i = 0 ; i < n / 2 ; i++){
if (a[i] == b[i] && a[n - 1 - i] == b[n - 1 - i])
continue;
if (a[i] == b[n - 1 - i] && a[n - 1 - i] == b[i])
continue;
if (a[i] == a[n - 1 - i] && b[i] == b[n - 1 - i])
continue;
if (a[i] == a[n - 1 - i]) {
if (b[i] == a[i] || b[n - 1 - i] == a[i])
ans++;
else ans += 2;
} else {
if (b[i] == b[n - 1 - i])
ans++;
else
ans += 2 - ((a[i] == b[i]) | (a[i] == b[n - 1 - i]) | (a[n - 1 - i] == b[i]) | (a[n - 1 - i] == b[n - 1 - i]));
}
}
if ((n & 1) && a[n / 2] != b[n / 2])
ans++;
cout << ans;
return 0;
}