算法来自 Github@SakurabaSeira