i
cludestdiohr
i
cludemallochr
defi
eN30停车场类最多的停车数r
defi
eM20便道内最多的停车数r
defi
eprice2每单位时间的停车费用r
typedefstructr
r
i
tcarNoN车牌号r
i
tcarTimeN进场时间r
i
ttop栈指针r
seqstack定义顺栈占类型r
typedefstructNoder
r
i
tcarNoM车牌号r
structNode
extr
li
kQueueNoder
typedefstructr
r
Li
kQueueNodefro
t队首指针r
Li
kQueueNoderear队尾指针r
Li
kQueue定义链队类型r
以下是顺序栈的基本运算算法r
voidI
itstackseqstacksr
r
sseqstackmallocsizeofseqstackr
stop1r
r
i
tIsEmptseqstacksr
r
retur
stop1r
r
i
tIsFullseqstacksr
r
retur
stopN1r
r
i
tPushseqstacksi
te1i
te2r
r
ifstopN1retur
0r
stopr
scarNostope1r
scarTimestope2r
retur
1r
r
i
tPopseqstacksi
te1i
te2r
r
ifstop1r
retur
0r
e1scarNostopr
e2scarTimestopr
stopr
retur
1r
r
voidDisqstackseqstacksr
r
i
tir
foristopi0ir
pri
tf