#include #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll H, W, Q; cin >> H >> W >> Q; unordered_map mp; ll ans = H * W; rep(q, Q) { int y, x; cin >> y >> x; --y; --x; if (mp.find(x) == mp.end()) { ans -= (H - y); mp[x] = y; } else if (mp[x] > y) { ans -= (mp[x] - y); mp[x] = y; } cout << ans << "\n"; } return 0; }