#include #include #include using namespace std; using ll = long long int; int main(){ int h, w, q; cin >> h >> w >> q; ll ans = (ll)h*w; vector y(q), x(q); map memo; for(int i = 0; i < q; i++){ cin >> y[i] >> x[i]; memo[x[i]] = h; } for(int i = 0; i < q; i++){ if(memo[x[i]] > y[i]-1){ ans -= memo[x[i]]; ans += y[i]-1; memo[x[i]] = y[i]-1; } cout << ans << endl; } return 0; }