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
0 B
|👍
/👎
0 B
|👍
/👎