讨论 / 哈哈哈哈哈哈
ztzxsy 2013-10-23 20:24:00
点我顶贴 收藏 删除
居然对了!

program wrs;

var

n:integer;

p,m,i:integer;

begin

p:=0;

read(n);

for i:=1 to n do begin

read(m);

p:=p+m;

end;if (p mod 2) =0 then

write(0)

else write(1);

end.

#1 phoenix@2008-06-29 10:13:00
回复 删除
唉``````````````````````````````````

数据```````````````````````````````

#2 wwww@2008-08-09 19:32:00
回复 删除
膜拜神牛!!!

#3 冰J@2010-09-14 19:59:00
回复 删除

超汗,这都可以??!!!!

#4 godd@2011-10-18 10:12:00
回复 删除
汗~~数据巨弱

...

#5 yumaosheng@2013-10-23 20:24:00
回复 删除
这才是正解!!

var

n,i,j,p,m:integer;

a:array[1..100] of integer;

f:array[0..5000] of integer;

begin

read(n);

p:=0;

for i:=1 to n do

begin

read(a[i]);

p:=p+a[i];

end;

m:=p;

p:=p div 2;

fillchar(f,sizeof(f),0);

for i:=1 to n do

for j:=p downto 1 do

if (j>=a[i]) and (abs(f[j-a[i]]+a[i]-p)<abs(f[j]-p))

then f[j]:=f[j-a[i]]+a[i];

p:=m-2*f[p];

writeln(p);

end.

无语了

#6 婆婆丁@2013-11-05 11:10:07
回复 删除
LZ逗比?这真么可能过?
#7 我为数学狂@2013-11-05 18:54:05
回复 删除
真的过了。。。回复 #6 婆婆丁:
#8 蓝色@2013-11-06 09:25:58
回复 删除
数据弱到死?
查看更多回复
提交回复