讨论 / 为什么WA0分??
sinian 2016-08-06 21:15:17
点我顶贴 收藏 删除
var i,j,k,n,m:longint;

var a:array[0..10000,0..10000]of longint;

var b:array[1..100]of longint;

begin

readln(n,m);

for i:=1 to n do

read(b[i]);

for i:=0 to b[1] do

a[1,i]:=1;

for i:=2 to n do

for j:=0 to m do

for k:=0 to b[i] do

if (j>=k) then a[i,j]:=(a[i-1,j-k]+a[i,j]) mod 1000007 else break;

writeln(a[n,m]);

end.

如题,在CODEVS上AC了,在RQNOJ挂了……大犇们求教……

#1 2681742991@2016-08-06 21:31:39
回复 删除
没人理你啊~~~~~
查看更多回复
提交回复