0_0_37843285_15675.cpp: In function 'void solve()': 0_0_37843285_15675.cpp:39:46: error: 'cnt' was not declared in this scope if(f1!=f2){fa[f2]=f1;ans1+=get<0>(i);cnt++;} ^