시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
4 초 (추가 시간 없음) | 256 MB | 1 | 1 | 1 | 100.000% |
Alisa, Boris and Konstantin are playing a game of strings. The rules are the following:
Alisa and Boris have already come up with their strings $A$ and $B$. Konstantin is curious: what is the probability of each of the outcomes? Calculate these probabilities for all reasonable values of the number $k$.
The first line of the input file contains a string $A$, and the second line contains a string $B$. The string $A$ consists of $n$ symbols, and the string $B$ consists of $m$ symbols ($1 \le n, m \le 2 \cdot 10^5$). Strings contain only lower case Latin letters.
In the output file, print $\min(n, m)$ lines, with three real numbers in each. The results for the case when Konstantin chooses a number $k$, must be placed in the $k$th line. The first number in the line defines the probability of Alisa winning, the second is the probability of friendship winning, and the third is about Boris winning.
The deviation of each printed number from the correct value should not be greater than $10^{-12}$.
abac ababa
0.2 0.4 0.4 0.33333333333333 0.333333333334 0.333333333333333 0.1666666666666 0.3333333333333 0.500000 0.5 0 0.5