#include #include #include #include #include #include #include using ll = long long; #define rep(i,n) for(int i = 0;i=0;i++) #define ALL(a) a.begin(),a.end() using namespace std; int main(){ ll h, w, q, x, y; cin >> h >> w >> q; map mp; ll sum = h*w,cnt=0; rep(i, q) { cin >> y >> x; if (mp[x] < (h - y + 1))sum-= (h-y+1)-mp[x],mp[x] = h - y+1; cout << sum << endl; } }