//
//  main.cpp
//  Adjacency Matrix
//
//  Created by Himanshu on 26/11/22.
//
 
#include <iostream>
#include <vector>
#include <cmath>
#include <climits>
#define N 5
using namespace std;

//N = number of nodes in graph
void printAdjacencyMatrix(int G[][N]) {
     
    for (int i=0; i<N; i++) {
        for (int j=0; j<N; j++) {
            cout<<G[i][j]<<" ";
        }
        cout<<endl;
    }
}

int main() {
    int G[N][N] = {{0, 1, 0, 0, 0},
                   {1, 0, 0, 1, 0},
                   {0, 0, 0, 1, 1},
                   {0, 1, 1, 0, 1},
                   {0, 0, 1, 1, 0}};
 
     
    cout<<"Graph G (Adjacency Matrix):"<<endl;
    printAdjacencyMatrix(G);
    
    return 0;
}