更新时间:2023-01-22 22:00:48
你的错误是假设 c [x] == p
和 c [y] == c0
。但索引 x
和 y
派生自 immutable 字符串 s
,它不会反映其洗牌状态下 c
中的值。
Your mistake is assuming c[x] == p
and c[y] == c0
. But the indexes x
and y
are derived from the immutable string s
, which doesn't reflect the values in c
in its shuffled state.