#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); int h, w, q; cin >> h >> w >> q; map mp; ll ans = h * w; while (q--) { int y, x; cin >> y >> x; if (mp.contains(x)) { ans += h - mp[x] + 1; if (mp[x] > y) mp[x] = y; } else mp[x] = y; ans -= h - mp[x] + 1; cout << ans << '\n'; } return 0; }