### Azuken's blog

By Azuken, history, 3 weeks ago, translation,
• +19

 » 3 weeks ago, # |   +3 If there multiple answers, you checker count only answer with minimum index. Question itself is good.
•  » » 3 weeks ago, # ^ | ← Rev. 3 →   0 Thanks for your feedback, the text has changed.
 » 3 weeks ago, # |   0 Auto comment: topic has been translated by Azuken (original revision, translated revision, compare)
 » 3 weeks ago, # | ← Rev. 2 →   0 samples pass in custom invocation but still runtime error on samples when submitting? Code// Have mercy upon us, O arav, our savior #include #ifndef ONLINE_JUDGE #include "anshul.cpp" extern void sublime(); #else #define see(...) 42 #endif #define int long long using namespace std; void dfs(vector>& adj,vector& vis, vector& component, int CurrentComponent, int CurrentNode) { if(vis[CurrentNode]) return; vis[CurrentNode] = true; component[CurrentNode] = CurrentComponent; for(auto neighbour : adj[CurrentNode]) dfs(adj,vis,component,CurrentComponent,neighbour); } void solve() { int n,m; cin>>n; m = n-1; vector> adj(n); for(int i=0;i>x>>y; x--;y--; adj[x].push_back(y); adj[y].push_back(x); } vector ans; vector vis(n,false); vector component(n); int CurrentComponent = 1; for(int node=0;node size; for(int i=0;i= mx_size) { mx_size = size[component[i]]; mx_cmp = component[i]; } } for(int i=0;i
•  » » 3 weeks ago, # ^ |   0 UPD: my bad, forgot to add  freopen("babochkain.txt", "r", stdin); freopen("babochkaout.txt", "w", stdout);