Cod sursa(job #21706)
Utilizator | Data | 24 februarie 2007 01:20:25 | |
---|---|---|---|
Problema | Jocul Flip | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.5 kb |
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.