Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:那位神牛看看,。为什么会输出格式错误。。In Reply To:那位神牛看看,。为什么会输出格式错误。。 Posted by:597100700 at 2011-09-15 22:45:02 > var a,b,c,d,e,m,n,sum:longint; > s1,s2:ansistring; > s:array[0..10000]of char; > ch:char; > begin > readln(n); > s1:=''; > for a:=1 to n do > begin > readln(ch); > s1:=s1+ch; > end; > s2:=''; > sum:=0; > for a:=length(s1) downto 1 do > s2:=s2+s1[a]; > for a:=1 to n do > begin > if s1<s2 then > begin > inc(sum); > s[sum]:=s1[1]; > delete(s1,1,1); > delete(s2,length(s2),1); > end > else > begin > inc(sum); > s[sum]:=s2[1]; > delete(s2,1,1); > delete(s1,length(s1),1); > end; > end; > for a:=1 to sum-1 do > write(s[a]); > writeln(s[sum]); > end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator