Untitled
unknown
plain_text
a year ago
369 B
9
Indexable
#include <bits/stdc++.h>
using namespace std;
int adj [10][10];
int main()
{
int n,e,u,v;
cin>>n>>e;
for(int i=0;i<e;i++)
{
cin>>u>>v;
adj[u][v]=1;
}
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cout<<adj[i][j]<<" ";
}
cout <<endl;
}
return 0;
}
Editor is loading...
Leave a Comment