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 |
暴力啊 ....program poj3981; var s,s2:string; c1,c2,c3:char; i:integer; begin readln(s); s:=s+' '; while s<>' 'do begin s2:=''; for i:=1 to length(s)-1 do begin c1:=s[i];c2:=s[i+1];c3:=s[i+2]; if (c1='y')and(i<=length(s)-2)and(c2='o')and(c3='u')and(s<>'EOF') then s2:=s2+'w' else if (c1='o')and(i<=length(s)-1)and(s[i-1]='y')and(c2='u')and(s<>'EOF')then s2:=s2+'e' else if (c1='u')and(i<=length(s))and(s[i-2]='y')and(s[i-1]='o')and(s<>'EOF')then s2:=s2 else if s<>'EOF' then s2:=s2+c1; end; delete(s2,length(s2),1); writeln(s2); readln(s); s:=s+' '; end; end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator