Consider two strings denoted by $$$s$$$ and $$$t$$$ of length $$$n$$$.
Define $$$f(a, b) = \frac{{\text{lcs}(a, b)}}{{|a| + |b|}}$$$, where $$$a$$$ and $$$b$$$ are strings, $$$\text{lcs}(a, b)$$$ represents the length of the longest common subsequence, and $$$|a|$$$ and $$$|b|$$$ are the respective lengths of strings $$$a$$$ and $$$b$$$.
Now, let $$$g(x, y) = f(\underbrace{s + \ldots + s}_{x\ \text{times}}, \underbrace{t + \ldots + t}_{y\ \text{times}})$$$, where $$$a + b$$$ denotes the concatenation of strings.
Find the maximal possible value of $$$g(x, y)$$$.
The first line contains one integer $$$T$$$ — the number of test cases.
The first line of each test case contains an integer $$$n$$$ $$$(1 \le n \le 200)$$$ — the length of strings $$$s$$$ and $$$t$$$.
The second line contains one string $$$s$$$ of length $$$n$$$.
The third line contains one string $$$t$$$ of length $$$n$$$.
Both strings consist only of lowercase Latin letters.
It is guaranteed that the sum of $$$n^2$$$ over all test cases does not exceed $$$10^5$$$.
For each test case, print the maximal possible value of $$$g(x, y)$$$. Your answer will be considered correct if its relative or absolute error does not exceed $$$10^{-9}$$$.
32assa3acbcab7qwdasdqasdqaqw
0.500000000000 0.333333333333 0.428571428571
| Name |
|---|


