#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; vector<int> adj[n+1]; for(int i=0;i<m;i++) { int u,v; cin>>u>>v; adj[u].push_back(v); adj[v].push_back(u); } return 0; }
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