PersonalCorpus 版 (精华区)

152601 04:15:56 3 Mar 2002
Bozhang,HIT,P.R.China 1098 Pascal Accepted 0.02 sec 139K


var
    s:array[1..30000] of char;
    t:array[1..30001] of word;
    i,j,n:integer;
begin
//    assign(input,'input1098.txt');reset(input);
  //  assign(output,'output1098.txt');rewrite(output);
    n:=0;
    while not eof(input) do begin
        while not eoln(input) do begin
            inc(n); read(s[n]);
        end;
        readln;
    end;
    if n<>1 then begin
        j:=n;t[n+1]:=1;
        while n>1 do begin
            t[n]:=((t[n+1]+1997) mod n)+1;
            dec(n);
        end;
        n:=j; j:=3-t[2];
        for i:=3 to n do if t[i]<=j then inc(j);
    end else j:=1;
    if s[j]='?' then writeln('Yes') else if s[j]=' ' then writeln('No') else
 writeln('No comments');
end.
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:1.988毫秒