鐵軌問題(棧操做)

題目 輸入輸出結果 理解 剛開始一直沒理解輸入的序列是進入C的仍是進入B的序列(固然答案是進入B的序列),而後進入C的序列是按順序的1,2,3…….ios 代碼 #include <iostream> #include <cstdio> #include <stack> using namespace std; const int maxn=1000; int target[maxn]; int
相關文章
相關標籤/搜索