Google code jam: Problem B. Magicka

Reading time ~1 minute


一直在想說為啥我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.

所以, ”1 QFT 1 QF 7 FAQFDFQ"的答案會是"[F, D, T]“而不是”[]“

浪費了一題… :(

[筆記][node.js] 使用nvm安裝查克拉版的node.js

從[nodejs 8](開始, nodejs可以不再需要一定跟V8綁在一起了, 之後底層的Engine可以換成微軟的[查克拉](… Continue reading