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

这是什么破题啊!明明测试数据过了,就是AC不了。谁帮我看看。。。(Pascal)

Posted by jiaruofei at 2010-08-06 21:24:22 on Problem 1298
program p1298(input,output);
        var
                a:array[1..200] of char;
                B:ARRAY[1..100,1..200]OF CHAR;
                i,j,k,M:longint;
                c:string;
                z:boolean;
        begin
                readln(c);
                FOR M:=1 TO 100 DO BEGIN
                IF C='ENDOFINPIT' THEN BREAK;
                FOR I:=1 to 200 do BEGIN
                        a[i]:=' ';
                END;
                        for i:=1 to 200 do begin
                                read(a[i]);
                                        If a[i]=' ' then b[M,i]:=a[i]
                                        else begin
                                                Z:=FALSE;
                                                IF A[I]=CHR(13) THEN BREAK;
                                                for j:=65 to 90 do begin
                                                if a[i]=chr(j) then BEGIN
                                                                z:=true;
                                                                BREAK;
                                                END;
                                                end;
                                                if z then begin
                                                        k:=ord(a[i])-5;
                                                        if k<65 then k:=k+26;
                                                        b[m,i]:=chr(k);
                                                end
                                                else b[M,i]:=a[i];
                                        end;
                                        if (a[i]=' ') and (a[i-1]=' ') then BEGIN
                                                READLN;
                                                BREAK
                                        END;
                        end;
                READLN(C);
                IF C='ENDOFINPUT'THEN BREAK;
                READLN(C);
                IF C='ENDOFINPUT'THEN BREAK;
                readln(c);
                IF C='ENDOFINPUT'THEN BREAK;
                END;
                k:=M;
                FOR I:=1 TO k DO BEGIN
                        IF B[1,I]=CHR(0) THEN BREAK;
                        for j:=1 to 200 do begin
                                write(b[i,j]);
                                if b[i,j]=chr(0) then BEGIN
                                WRITELN;
                                BREAK
                                END;
                        end;
                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