#include // #include #define rng(a) a.begin(),a.end() #define rrng(a) a.rbegin(),a.rend() #define INF 2000000000000000000 #define ll long long #define ld long double #define pll pair using namespace std; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> H >> W >> Q; ll ans = W * H; vector board(W, H); for (ll i = 0; i < Q; ++i) { ll y, x; cin >> y >> x; y -= 1, x -= 1; ll before = board.at(x); ll now = y; chmin(board.at(x), y); ans -= max(0ll, before - now); cout << ans << "\n"; } }