- 最佳课题选择
- 2009-09-06 16:26:37 @
rt
以下是程序:
var
n,m,i,j,k,l:longint;
x,y:Array[1..2000] of int64;
z:Array[1..200,0..2000] of int64;
f:array[0..2000] of int64;
begin
read(n,m);
for i:=1 to m do
read(x[i],y[i]);
for i:=1 to n do
begin
for j:=1 to n do
begin
z:=x[i];
for k:=1 to y[i] do
z:=z*j;
end;
end;
for i:=0 to n do
f[i]:=z[1,i];
f[0]:=0;
for i:=2 to m do
for j:=n downto 1 do
for k:=0 to j do
if f[j-k]+z
1 条评论
-
First_blood LV 9 @ 2009-10-11 08:26:48
rt
纯属rp问题
- 1