p1808.pas
来自「高手写的所有acm例程 在acm.zju.edu.cn 上的题目的例程」· PAS 代码 · 共 40 行
PAS
40 行
PROGRAM p1808;
VAR
data :array[1..2000]of string;
have :longint;
s :string;
step :longint;
FUNCTION check:boolean;
var
i,j :longint;
begin
check:=true;
for I:=1 to have do
for j:=1 to have do
if (i<>j)and(length(data[i])<=length(data[j]))and(pos(data[i],data[j])=1)then
begin
check:=false;
exit;
end;
end;
BEGIN
step:=0;
while not eof do
begin
readln(s);
inc(step);
have:=0;
while s<>'9' do
begin
inc(have);
data[have]:=s;
readln(s);
end;
if check then writeln('Set ',step,' is immediately decodable') else
writeln('Set ',step,' is not immediately decodable');
end;
END.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?