?? sortseq.prog
字號:
Using a sorted sequence to list all elements in a sequence of strings lyinglexicographically between two given search strings.\#include $<$LEDA/sortseq.h$>$main()$\{$ \hspace*{.5cm}sortseq\<string,int\> $S$;\hspace*{.5cm}string $s_1,s_2$;\smallskip\hspace*{.5cm}\While ( cin $>>$ $s_1$ \&\& $s_1$ != ``stop'' ) $S$.insert($s_1,0$);\smallskip\hspace*{.5cm}\While ( cin $>>$ $s_1$ $>>$ $s_2$ )\hspace*{1.5cm}$\{$ seq\_item $stop = S$.locate($s_2$);\smallskip\hspace*{1.8cm}\For (seq\_item $it = S$.locate($s_1$); $it$ != $stop$; $it = S$.succ($it$))\\\hspace*{2.6cm}cout $<<$ $S$.key($it$) $<<$ ``$\backslash$"; \hspace*{1.5cm}$\}$\smallskip$\}$
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -