/** * author: shu8Cream * created: 15.01.2021 21:54:39 **/ #include using namespace std; #define rep(i,n) for (int i=0; i<(n); i++) #define all(x) (x).begin(), (x).end() using ll = long long; using P = pair; using vi = vector; using vvi = vector; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll h,w,q; cin >> h >> w >> q; ll ans = h*w; map m; while(q--){ int y,x; cin >> y >> x; y--; x--; ll cnt = h-y; if(!m.count(x)) m[x]=y; else if(m[x]>y){ cnt=m[x]-y; m[x]=y; }else cnt=0; ans-=cnt; cout << ans << endl; } }