一直在想說為啥我submit的答案有問題想到沒睡好, 剛剛才發現, 我誤會了一個關鍵句:
it is opposed to something in your element list, then your whole element list will be cleared.
結果我誤解成只有被兩個字元夾住的區域才會clear, test set也沒驗出我的問題…. = =“
If the two elements from a pair appear at the end of the element list, then both elements of the pair will be immediately removed, and they will be replaced by the element they form.