#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; using mint = modint998244353; int main() { ll H, W, Q; cin >> H >> W >> Q; map mp; ll ans = H * W; for (int i = 0; i < Q; i++) { ll x, y; cin >> y >> x; ll mi = H + 1; if (mp.count(x)) { mi = mp[x]; mp[x] = min(mi, y); } else { mp[x] = y; } ans -= max(mi - y, 0LL); cout << ans << endl; } return 0; }