Codeforces Round #407 (Div. 2), problem: (D) Weird journey Solution in C
#include<bits/stdc++.h> #define ll long long using namespace std; ll in; vector<int>adj; ll ans=0; bool g; int dfs(int cur) { g=true; int k,cnt=1; for(k=0;k<adj.size();k++) { if(g]==false) { cnt+=dfs(adj); } } return cnt; }; ll ct; int …