#include using namespace std; using ll=long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll h,w,n;cin>>h>>w>>n; vector>imos(h+1,vector(w+1)); for(int i=0;i>y>>x>>r>>c; y--;x--; imos[y][x]++; imos[y][c]--; imos[r][x]--; imos[r][c]++; } for(int i=0;i