#include<bits/stdc++.h> using namespace std; const int N = 1e3+5; int graph[N][N]; int main() { int v,e,j,k; cin>>v>>e; for(int i=0;i<e;++i) { cin>>j>>k; graph[i][j]=1; graph[j][i]=1; } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter