#include #include using namespace std; int main(){ int w, h, n; long long int match=0; cin >> w >> h >> n; vector< vector > hand(n, vector(2)); vector< vector > talon(w, vector(h, true)); for(int i=0; i> hand[i][j]; --hand[i][j]; } talon[hand[i][0]][hand[i][1]]=false; } for(int i=0; i