#include using namespace std; using lint = long long; int main() { cin.tie(nullptr), ios::sync_with_stdio(false); lint H, W; cin >> H >> W; lint ret = H * W; int Q; cin >> Q; unordered_map mp; while (Q--) { int y, x; cin >> y >> x; if (!mp.count(x)) mp[x] = H + 1; if (y < mp[x]) { lint d = mp[x] - y; mp[x] = y; ret -= d; } cout << ret << '\n'; } }