#include #include using namespace std; using ll = long long int; int main(){ int h, w, q; cin >> h >> w >> q; ll ans = (ll)h*w; vector canuse(w, h); while(q--){ int y, x; cin >> y >> x; if(canuse[x-1] > y-1){ ans -= canuse[x-1]; ans += y-1; canuse[x-1] = y-1; } cout << ans << endl; } return 0; }