#include <bits/stdc++.h>
using namespace std;
int main() {
int a[20][20][20];
int w, x, h, q, sum = 0;
cin >> w >> x >> h >> q;
while (q--) {
int x1, y1, z1, x2, y2, z2;
cin >> x1 >> y1 >> z1 >> x2 >> y2 >> z2;
for (int i = x1; i <= x2; i++)
for (int j = y1; j <= y2; j++)
for (int k = z1; k <= z2; k++)
a[i][j][k] = 1;
}
for (int i = 0; i < w; i++)
for (int j = 0; j < x; j++)
for (int k = 0; k < h; k++)
if (a[i][j][k] != 1)
sum++;
cout << sum << endl;
return 0;
}
恳请各位指点错误