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

觉得WA得很茫然...

Posted by Coldwings at 2005-03-20 21:30:08 on Problem 1126
function chk:boolean;
  var ch:char;
  begin
    if eoln then chk:=false
      else begin
        read(ch);
        if (ch in ['p'..'z']) then chk:=true
          else begin
            if ch='N' then
              chk:=chk
            else if ch in ['C','D','E','I'] then begin
              chk:=chk and chk;
            end else chk:=false;
          end;
      end;
  end;

begin
  while not eof do begin
    if (chk)and(eoln) then writeln('YES') else writeln('NO');
    readln;
  end;
end.

实在不明哪里有问题...
EOF也试过,空行也试过,结果还是wa...大牛可否解释一下?

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