- 凯撒密码
- 2009-05-29 20:22:30 @
首先是原先的程序:
var a:array[1..256]of longint;
f:array[1..65536]of longint;
le:array[1..65536,1..10]of longint;
i,j,k,l,m,u,min:longint;
s:ansistring;
begin
read(s);
l:=length(s);
for i:=1 to l do
if sqrt(i)=trunc(sqrt(i)) then begin inc(k); a[k]:=i; end;
m:=k;
f[1]:=1;
for i:=1 to l do
begin
min:=maxlongint;
for j:=m downto 1 do
if i-a[j]>=0 then
if f[i-a[j]]+1=0 then
if f[i-a[j]]+1
0 条评论
目前还没有评论...