moshkit icon

ARTIST

moshkit | PRO | 01/06/20 03:05:16 PM UTC | 0 ⭐ | 7759 👁️ | Never ⏰ | []
Pascal |

500 B

|

None

|

0 👍

/

0 👎

program hudozhik;
 
var
  i, w, h, a, n, S, b, x1, x2, y1, y2: integer;
  holst: array [,] of integer;
 
begin
  Readln(h, w);
  holst := new integer[w, h];
  Readln(n);
  for a := 0 to w - 1 do
    for b := 0 to h - 1 do
      holst[a, b] := 1;
  for i := 1 to n do
  begin
    Readln(x1, y1, x2, y2);
    for a := x1 to x2 - 1 do
      for b := y1 to y2 - 1 do
        holst[a, b] := 0;
  end;
  for a := 0 to w - 1 do
    for b := 0 to h - 1 do
      S := S + holst[a, b];
  Writeln(S);
end.

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎