#include <iostream>
using namespace std;

int main() {
    int n;
    cin >> n; 

    int arr[19][19] = {0,};

    for (int i = 0; i < n; i++) {
        int x, y;
        cin >> x >> y;
        arr[x - 1][y - 1] = 1;
    }

    for (int i = 0; i < 19; i++) {
        for (int j = 0; j < 19; j++) {
            cout << arr[i][j] << " ";
        }
        cout << "\n";
    }

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: