For this Question: You are given a square matrix of size N*N. Initially all elements of this matrix are equal to 0. You are given Q queries. Each query consists of two integers, i and j (1 <= i, j <= N) wherein you increase the value of all elements in the i<sup>th</sup> row and j<sup>th</sup> column by 1. After doing this, for each query print the number of zeroes left in the matrix.The first line of the input consists of two integers N and Q.
The next Q lines each contains two integers i and j.

Constraints:
1 <= N, Q <= 10<sup>5</sup>
1 <= i, j <= NFor each query print the number of zeroes left in the matrix.Sample Input:
3 3
1 1
1 2
3 2

Sample Output:
4 2 1

Explaination:
Initially, the matrix will look like:
0 0 0 
0 0 0
0 0 0

After the first query, the matrix will look something like this:
1 1 1
1 0 0 
1 0 0 
<b>Number of zeroes = 4</b>

After the second query, the matrix will look something like this:
1 1 1
1 1 0 
1 1 0 
<b>Number of zeroes = 2</b>

After the third query, the matrix will look something like this:
1 1 1
1 1 0 
1 1 1
<b>Number of zeroes = 1</b>

, I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;
#define int long long

signed main() {
    int n, r = 0, c = 0;
    cin >> n;
    int k;
    cin >> k;
    int ans = n*n;
    vector<int> row(n + 1), col(n + 1);
    while(k--){
        int i, j;
        cin >> i >> j;
        if(row[i] == 0) ans -= n - c, row[i] = 1, r++;
        if(col[j] == 0) ans -= n - r, col[j] = 1, c++;
        cout << ans << ' ';
    }
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?