Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:70题留念附pascal 1AC代码

Posted by demaxiya at 2012-08-29 10:22:54 on Problem 1575
In Reply To:70题留念附pascal 1AC代码 Posted by:aiouniya at 2012-08-23 16:50:53
LZSB 耳光接好
const yy:array ['a'..'z'] of byte=(1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0);
var
yd,cf,lb:boolean;
i,j,k,l:integer;
s:string;
begin
while true do
begin
readln(s);
if s='end' then exit;
yd:=false;
cf:=true;
lb:=true;
k:=length(s);
for i:=1 to k do if yy[s[i]]=1 then yd:=true;
if yd then for i:=3 to k do if (yy[s[i]]=yy[s[i-1]]) and (yy[s[i]]=yy[s[i-2]]) then begin cf:=false;break end;
if yd and cf then for i:=2 to k do if (s[i]=s[i-1]) and (s[i]<>'o') and (s[i]<>'e') then begin lb:=false;break end;
if yd and cf and lb then writeln('<',s,'>',' is acceptable.')
                    else writeln('<',s,'>',' is not acceptable.');
end;
end.

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator