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