Pagini recente » Cod sursa (job #773911) | Cod sursa (job #2198042) | Cod sursa (job #2520937) | Cod sursa (job #1877312) | Cod sursa (job #21706)
Cod sursa(job #21706)
program filip;
type vector=array[1..16] of samllint;
var m,n:vector;
max:real;
f,g:text;
i,j:integer;
aux_m,aux_n:integer;
begin
assign(f,'filip.in');reset(f);
assign(g,'filip.out');rewrite(g);
max:=0;
readln(f,i,j);
for i:=1 to n do
for j:=1 to n do
begin
readln (m[i]);
readln (n[j]);
if m[i]>0 then max:=max + m[i] else max:=max-m[i];
if n[j]>0 then max:=max + n[j] else max:=max-n[j];
end;
writeln(g,max);
end.