为设么有一个点还是过不去?
http://www.rqnoj.cn/Status_Show.asp?SID=100516
var a:array[1..3000,1..3000]of qword;
n,k,i,j,h:longint;
function b(i:longint):boolean;
var u:longint;
begin
b:=true;
for u:=1 to n-i do
if a[i,u]<>a[i,u+1] then
begin
b:=false;
break;
end;
end;
begin
readln(n,k);
for i:=1 to n do read(a[1,i]);
i:=1;
repeat
inc(i);
for j:=1 to n-i+1 do a[i,j]:=a[i-1,j+1]-a[i-1,j];
until b(i) or (i>n);
if i>n then
begin
writeln(’No’);
exit;
end;
h:=i;
for i:=n-h+2 to n-h+1+k do a[h,i]:=a[h,i-1];
for i:=h-1 downto 1 do
for j:=n-i+2 to n-i+1+k do
a[i,j]:=a[i+1,j-1]+a[i,j-1];
writeln(’Yes’);
write(a[1,n+1]);
for i:=n+2 to n+k do write(’ ’,a[1,i]);
end.
测试结果1: 通过本测试点|有效耗时156:ms
测试结果2: 通过本测试点|有效耗时47:ms
测试结果3: 通过本测试点|有效耗时62:ms
测试结果4: 通过本测试点|有效耗时47:ms
测试结果5: 通过本测试点|有效耗时47:ms
测试结果6: 通过本测试点|有效耗时172:ms
测试结果7: 通过本测试点|有效耗时47:ms
测试结果8: 运行错误|未定义错误编号|错误编号:106
测试结果9: 通过本测试点|有效耗时47:ms
测试结果10: 通过本测试点|有效耗时47:ms