#include using namespace std; using ll = long long; int main() { int h, w, q; cin >> h >> w >> q; map mp; long long ans = (ll)h * w; for (int i = 0; i < q; i++) { int x, y; cin >> y >> x; if (mp[x] == 0) { ans -= (h - y + 1); mp[x] = y; } else if (mp[x] > y) { ans -= mp[x] - y; mp[x] = y; } cout << ans << endl; } }