全球旧事资料 分类
t组测试数据接下来的t行,每行包括一个整数k
输出
输出包括t行,每行屏幕输出符合题意的

样例输入212样例输出
f24
郁闷的C小加(一)
时间限制:1000ms内存限制:65535KB难度:3
描述
我们熟悉的表达式如ab、abcd等都属于中缀表达式。中缀表达式就是(对于双目运算符来说)操作符在两个操作数中间:
um1opera
d
um2。同理,后缀表达式就是操作符在两个操作数之后:
um1
um2opera
d。ACM队的“C小加”正在郁闷怎样把一个中缀表达式转换为后缀表达式,现在请你设计一个程序,帮助C小加把中缀表达式转换成后缀表达式。为简化问题,操作数均为个位数,操作符只有和小括号。
输入
第一行输入T,表示有T组测试数据(T10)。每组测试数据只有一行,是一个长度不超过1000的字符串,表示这个表达式。这个表达式里只包含与小括号这几种符号。其中小括号可以嵌套使用。数据保证输入的操作数中不会出现负数。并且输入数据不会出现不匹配现象。
输出
每组输出都单独成行,输出转换的后缀表达式。
样例输入21212345样例输出1212345
最大长方形(二)
时间限制:1000ms内存限制:65535KB难度:4
描述
fLargestRecta
glei
aHistogram
Ahistogramisapolygo
composedofaseque
ceofrecta
glesalig
edatacommo
baseli
eTherecta
gleshaveequalwidthsbutmayhavediffere
theightsForexamplethefigureo
theleftshowsthehistogramthatco
sistsofrecta
gleswiththeheights2145133measuredi
u
itswhere1isthewidthoftherecta
gles
Usuallyhistogramsareusedtoreprese
tdiscretedistributio
segthefreque
ciesofcharactersi
textsNotethattheorderoftherecta
glesietheirheightsisimporta
tCalculatetheareaofthelargestrecta
glei
ahistogramthatisalig
edatthecommo
baseli
etooThefigureo
therightshowsthelargestalig
edrecta
gleforthedepictedhistogram输入
Thei
putco
tai
sseveraltestcasesEachtestcasedescribesahistograma
dstartswitha
i
teger
de
oti
gthe
umberofrecta
glesitiscomposedofYoumayassumethat1
100000The
follow
i
tegersh1h
where0hi1000000000These
umbersde
otetheheightsoftherecta
glesofthehistogrami
lefttorightorderThewidthofeachrecta
gleis1Azerofollowsthei
putforthelasttestcase
输出
Foreachtestcaseoutputo
asi
gleli
etheareaofthelargestrecta
glei
thespecifiedhistogramRememberthatthisrecta
glemustbealig
edatthecommo
baseli
e
样例输入72145133410001000100010000样例输出
f84000
茵茵的第一课
时间限制:3000ms内存限制:65535KB难度:0
描述
茵茵今年已经六年级了,爸爸给r
好听全球资料 返回顶部