CF1006D Two Strings Swaps

题目描述

**题目大意:** 有两个长度为$n$的字符串a,b,现有三种操作 - 交换$a_i,b_i$ - 交换$a_i,a_{n-i+1}$ - 交换$b_i,b_{n-i+1}$ 可以发现$a$不一定能通过这些交换变成$b$ 现在你还有一种操作,在交换字符之前,你可以把$a$中某个位置字符变成任意一个字符 问要使$a==b$最少要用**操作四**多少次

输入格式

第一行一个整数$n$ 第二行字符串$a$,第三行字符串$b$

输出格式

一个整数,表示用操作四的最少次数

说明/提示

In the first example preprocess moves are as follows: $ a_1 := $ 'b', $ a_3 := $ 'c', $ a_4 := $ 'a' and $ a_5:= $ 'b'. Afterwards, $ a = $ "bbcabba". Then we can obtain equal strings by the following sequence of changes: $ swap(a_2, b_2) $ and $ swap(a_2, a_6) $ . There is no way to use fewer than $ 4 $ preprocess moves before a sequence of changes to make string equal, so the answer in this example is $ 4 $ . In the second example no preprocess moves are required. We can use the following sequence of changes to make $ a $ and $ b $ equal: $ swap(b_1, b_5) $ , $ swap(a_2, a_4) $ .